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

#include "kscreensaversettings.h"

#include <kglobal.h>
#include <QtCore/QFile>

class KScreenSaverSettingsHelper
{
  public:
    KScreenSaverSettingsHelper() : q(0) {}
    ~KScreenSaverSettingsHelper() { delete q; }
    KScreenSaverSettings *q;
};
K_GLOBAL_STATIC(KScreenSaverSettingsHelper, s_globalKScreenSaverSettings)
KScreenSaverSettings *KScreenSaverSettings::self()
{
  if (!s_globalKScreenSaverSettings->q) {
    new KScreenSaverSettings;
    s_globalKScreenSaverSettings->q->readConfig();
  }

  return s_globalKScreenSaverSettings->q;
}

KScreenSaverSettings::KScreenSaverSettings(  )
  : KConfigSkeleton( QLatin1String( "kscreensaverrc" ) )
{
  Q_ASSERT(!s_globalKScreenSaverSettings->q);
  s_globalKScreenSaverSettings->q = this;
  setCurrentGroup( QLatin1String( "ScreenSaver" ) );

  KConfigSkeleton::ItemBool  *itemScreenSaverEnabled;
  itemScreenSaverEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Enabled" ), mScreenSaverEnabled, false );
  addItem( itemScreenSaverEnabled, QLatin1String( "ScreenSaverEnabled" ) );
  KConfigSkeleton::ItemBool  *itemLegacySaverEnabled;
  itemLegacySaverEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "LegacySaverEnabled" ), mLegacySaverEnabled, false );
  addItem( itemLegacySaverEnabled, QLatin1String( "LegacySaverEnabled" ) );
  KConfigSkeleton::ItemInt  *itemTimeout;
  itemTimeout = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Timeout" ), mTimeout, 300 );
  addItem( itemTimeout, QLatin1String( "Timeout" ) );
  KConfigSkeleton::ItemBool  *itemSuspendWhenInvisible;
  itemSuspendWhenInvisible = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "SuspendWhenInvisible" ), mSuspendWhenInvisible, true );
  addItem( itemSuspendWhenInvisible, QLatin1String( "SuspendWhenInvisible" ) );
  KConfigSkeleton::ItemInt  *itemActionTopLeft;
  itemActionTopLeft = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "ActionTopLeft" ), mActionTopLeft, 0 );
  addItem( itemActionTopLeft, QLatin1String( "ActionTopLeft" ) );
  KConfigSkeleton::ItemInt  *itemActionTopRight;
  itemActionTopRight = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "ActionTopRight" ), mActionTopRight, 0 );
  addItem( itemActionTopRight, QLatin1String( "ActionTopRight" ) );
  KConfigSkeleton::ItemInt  *itemActionBottomLeft;
  itemActionBottomLeft = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "ActionBottomLeft" ), mActionBottomLeft, 0 );
  addItem( itemActionBottomLeft, QLatin1String( "ActionBottomLeft" ) );
  KConfigSkeleton::ItemInt  *itemActionBottomRight;
  itemActionBottomRight = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "ActionBottomRight" ), mActionBottomRight, 0 );
  addItem( itemActionBottomRight, QLatin1String( "ActionBottomRight" ) );
  KConfigSkeleton::ItemBool  *itemLock;
  itemLock = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Lock" ), mLock, false );
  addItem( itemLock, QLatin1String( "Lock" ) );
  KConfigSkeleton::ItemInt  *itemLockGrace;
  itemLockGrace = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "LockGrace" ), mLockGrace, 5000 );
  addItem( itemLockGrace, QLatin1String( "LockGrace" ) );
  KConfigSkeleton::ItemBool  *itemAutoLogout;
  itemAutoLogout = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "AutoLogout" ), mAutoLogout, false );
  addItem( itemAutoLogout, QLatin1String( "AutoLogout" ) );
  KConfigSkeleton::ItemInt  *itemAutoLogoutTimeout;
  itemAutoLogoutTimeout = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "AutoLogoutTimeout" ), mAutoLogoutTimeout, 600 );
  addItem( itemAutoLogoutTimeout, QLatin1String( "AutoLogoutTimeout" ) );
  KConfigSkeleton::ItemInt  *itemPriority;
  itemPriority = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Priority" ), mPriority, 19 );
  addItem( itemPriority, QLatin1String( "Priority" ) );
  KConfigSkeleton::ItemString  *itemSaver;
  itemSaver = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Saver" ), mSaver );
  addItem( itemSaver, QLatin1String( "Saver" ) );
  KConfigSkeleton::ItemStringList  *itemPluginsUnlock;
  itemPluginsUnlock = new KConfigSkeleton::ItemStringList( currentGroup(), QLatin1String( "PluginsUnlock" ), mPluginsUnlock );
  addItem( itemPluginsUnlock, QLatin1String( "PluginsUnlock" ) );
  KConfigSkeleton::ItemStringList  *itemPluginOptions;
  itemPluginOptions = new KConfigSkeleton::ItemStringList( currentGroup(), QLatin1String( "PluginOptions" ), mPluginOptions );
  addItem( itemPluginOptions, QLatin1String( "PluginOptions" ) );
  KConfigSkeleton::ItemBool  *itemPlasmaEnabled;
  itemPlasmaEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "PlasmaEnabled" ), mPlasmaEnabled, false );
  addItem( itemPlasmaEnabled, QLatin1String( "PlasmaEnabled" ) );
  KConfigSkeleton::ItemString  *itemGreeterQML;
  itemGreeterQML = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "GreeterQML" ), mGreeterQML, QLatin1String( "org.kde.passworddialog" ) );
  addItem( itemGreeterQML, QLatin1String( "GreeterQML" ) );
}

KScreenSaverSettings::~KScreenSaverSettings()
{
  if (!s_globalKScreenSaverSettings.isDestroyed()) {
    s_globalKScreenSaverSettings->q = 0;
  }
}

