// This file is generated by kconfig_compiler_kf5 from kopetestatussettings.kcfg.
// All changes you do to this file will be lost.

#include "kopetestatussettings.h"

#include <qglobal.h>
#include <QFile>

using namespace Kopete;

namespace Kopete {

class StatusSettingsHelper
{
  public:
    StatusSettingsHelper() : q(nullptr) {}
    ~StatusSettingsHelper() { delete q; q = nullptr; }
    StatusSettingsHelper(const StatusSettingsHelper&) = delete;
    StatusSettingsHelper& operator=(const StatusSettingsHelper&) = delete;
    StatusSettings *q;
};

}
Q_GLOBAL_STATIC(StatusSettingsHelper, s_globalStatusSettings)
StatusSettings *StatusSettings::self()
{
  if (!s_globalStatusSettings()->q) {
    new StatusSettings;
    s_globalStatusSettings()->q->read();
  }

  return s_globalStatusSettings()->q;
}

StatusSettings::StatusSettings( )
  : KConfigSkeleton( QStringLiteral( "kopeterc" ) )
{
  Q_ASSERT(!s_globalStatusSettings()->q);
  s_globalStatusSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Status" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesprotocolStatusMenuType;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("StatusesNotFiltered");
    valuesprotocolStatusMenuType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("StatusesWithSameCategory");
    valuesprotocolStatusMenuType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("UseParentStatusCategory");
    valuesprotocolStatusMenuType.append( choice );
  }
  mProtocolStatusMenuTypeItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "protocolStatusMenuType" ), mProtocolStatusMenuType, valuesprotocolStatusMenuType, EnumProtocolStatusMenuType::StatusesNotFiltered );
  addItem( mProtocolStatusMenuTypeItem, QStringLiteral( "protocolStatusMenuType" ) );
}

StatusSettings::~StatusSettings()
{
  if (s_globalStatusSettings.exists() && !s_globalStatusSettings.isDestroyed()) {
    s_globalStatusSettings()->q = nullptr;
  }
}

