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

#include "coverswitchconfig.h"

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

#include <QDebug>

using namespace KWin;

namespace KWin {

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

Q_GLOBAL_STATIC(CoverSwitchConfigHelper, s_globalCoverSwitchConfig)
CoverSwitchConfig *CoverSwitchConfig::self()
{
  if (!s_globalCoverSwitchConfig()->q)
     qFatal("you need to call CoverSwitchConfig::instance before using");
  return s_globalCoverSwitchConfig()->q;
}

void CoverSwitchConfig::instance(const QString& cfgfilename)
{
  if (s_globalCoverSwitchConfig()->q) {
     qDebug() << "CoverSwitchConfig::instance called after the first use - ignoring";
     return;
  }
  new CoverSwitchConfig(KSharedConfig::openConfig(cfgfilename));
  s_globalCoverSwitchConfig()->q->read();
}

void CoverSwitchConfig::instance(KSharedConfig::Ptr config)
{
  if (s_globalCoverSwitchConfig()->q) {
     qDebug() << "CoverSwitchConfig::instance called after the first use - ignoring";
     return;
  }
  new CoverSwitchConfig(config);
  s_globalCoverSwitchConfig()->q->read();
}

CoverSwitchConfig::CoverSwitchConfig(  KSharedConfig::Ptr config  )
  : KConfigSkeleton( config )
{
  Q_ASSERT(!s_globalCoverSwitchConfig()->q);
  s_globalCoverSwitchConfig()->q = this;
  setCurrentGroup( QStringLiteral( "Effect-CoverSwitch" ) );

  KConfigSkeleton::ItemUInt  *itemDuration;
  itemDuration = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "Duration" ), mDuration, 0 );
  addItem( itemDuration, QStringLiteral( "Duration" ) );
  KConfigSkeleton::ItemBool  *itemAnimateSwitch;
  itemAnimateSwitch = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AnimateSwitch" ), mAnimateSwitch, true );
  addItem( itemAnimateSwitch, QStringLiteral( "AnimateSwitch" ) );
  KConfigSkeleton::ItemBool  *itemAnimateStart;
  itemAnimateStart = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AnimateStart" ), mAnimateStart, true );
  addItem( itemAnimateStart, QStringLiteral( "AnimateStart" ) );
  KConfigSkeleton::ItemBool  *itemAnimateStop;
  itemAnimateStop = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AnimateStop" ), mAnimateStop, true );
  addItem( itemAnimateStop, QStringLiteral( "AnimateStop" ) );
  KConfigSkeleton::ItemBool  *itemReflection;
  itemReflection = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Reflection" ), mReflection, true );
  addItem( itemReflection, QStringLiteral( "Reflection" ) );
  KConfigSkeleton::ItemColor  *itemMirrorFrontColor;
  itemMirrorFrontColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "MirrorFrontColor" ), mMirrorFrontColor, QColor(0, 0, 0) );
  addItem( itemMirrorFrontColor, QStringLiteral( "MirrorFrontColor" ) );
  KConfigSkeleton::ItemColor  *itemMirrorRearColor;
  itemMirrorRearColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "MirrorRearColor" ), mMirrorRearColor, QColor(0, 0, 0) );
  addItem( itemMirrorRearColor, QStringLiteral( "MirrorRearColor" ) );
  KConfigSkeleton::ItemBool  *itemWindowTitle;
  itemWindowTitle = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "WindowTitle" ), mWindowTitle, true );
  addItem( itemWindowTitle, QStringLiteral( "WindowTitle" ) );
  KConfigSkeleton::ItemUInt  *itemZPosition;
  itemZPosition = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "zPosition" ), mZPosition, 900 );
  addItem( itemZPosition, QStringLiteral( "zPosition" ) );
  KConfigSkeleton::ItemBool  *itemTabBox;
  itemTabBox = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "TabBox" ), mTabBox, false );
  addItem( itemTabBox, QStringLiteral( "TabBox" ) );
  KConfigSkeleton::ItemBool  *itemTabBoxAlternative;
  itemTabBoxAlternative = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "TabBoxAlternative" ), mTabBoxAlternative, false );
  addItem( itemTabBoxAlternative, QStringLiteral( "TabBoxAlternative" ) );
}

CoverSwitchConfig::~CoverSwitchConfig()
{
  s_globalCoverSwitchConfig()->q = nullptr;
}

