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

#include "cubeslideconfig.h"

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

#include <QDebug>

using namespace KWin;

namespace KWin {

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

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

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

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

CubeSlideConfig::CubeSlideConfig(  KSharedConfig::Ptr config  )
  : KConfigSkeleton( config )
{
  Q_ASSERT(!s_globalCubeSlideConfig()->q);
  s_globalCubeSlideConfig()->q = this;
  setCurrentGroup( QStringLiteral( "Effect-CubeSlide" ) );

  KConfigSkeleton::ItemInt  *itemRotationDuration;
  itemRotationDuration = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "RotationDuration" ), mRotationDuration, 0 );
  addItem( itemRotationDuration, QStringLiteral( "RotationDuration" ) );
  KConfigSkeleton::ItemBool  *itemDontSlidePanels;
  itemDontSlidePanels = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DontSlidePanels" ), mDontSlidePanels, true );
  addItem( itemDontSlidePanels, QStringLiteral( "DontSlidePanels" ) );
  KConfigSkeleton::ItemBool  *itemDontSlideStickyWindows;
  itemDontSlideStickyWindows = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DontSlideStickyWindows" ), mDontSlideStickyWindows, false );
  addItem( itemDontSlideStickyWindows, QStringLiteral( "DontSlideStickyWindows" ) );
  KConfigSkeleton::ItemBool  *itemUsePagerLayout;
  itemUsePagerLayout = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UsePagerLayout" ), mUsePagerLayout, true );
  addItem( itemUsePagerLayout, QStringLiteral( "UsePagerLayout" ) );
  KConfigSkeleton::ItemBool  *itemUseWindowMoving;
  itemUseWindowMoving = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseWindowMoving" ), mUseWindowMoving, false );
  addItem( itemUseWindowMoving, QStringLiteral( "UseWindowMoving" ) );
}

CubeSlideConfig::~CubeSlideConfig()
{
  s_globalCubeSlideConfig()->q = nullptr;
}

