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

#include "dashboardconfig.h"

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

using namespace KWin;

namespace KWin {

class DashboardConfigHelper
{
  public:
    DashboardConfigHelper() : q(0) {}
    ~DashboardConfigHelper() { delete q; }
    DashboardConfig *q;
};
}

K_GLOBAL_STATIC(DashboardConfigHelper, s_globalDashboardConfig)
DashboardConfig *DashboardConfig::self()
{
  if (!s_globalDashboardConfig->q) {
    new DashboardConfig;
    s_globalDashboardConfig->q->readConfig();
  }

  return s_globalDashboardConfig->q;
}

DashboardConfig::DashboardConfig(  )
  : KConfigSkeleton( QLatin1String( "kwinrc" ) )
{
  Q_ASSERT(!s_globalDashboardConfig->q);
  s_globalDashboardConfig->q = this;
  setCurrentGroup( QLatin1String( "Effect-Dashboard" ) );

  KConfigSkeleton::ItemInt  *itemBrightness;
  itemBrightness = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Brightness" ), mBrightness, 50 );
  addItem( itemBrightness, QLatin1String( "Brightness" ) );
  KConfigSkeleton::ItemInt  *itemSaturation;
  itemSaturation = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Saturation" ), mSaturation, 50 );
  addItem( itemSaturation, QLatin1String( "Saturation" ) );
  KConfigSkeleton::ItemInt  *itemDuration;
  itemDuration = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Duration" ), mDuration, 0 );
  addItem( itemDuration, QLatin1String( "Duration" ) );
  KConfigSkeleton::ItemBool  *itemBlur;
  itemBlur = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Blur" ), mBlur, false );
  addItem( itemBlur, QLatin1String( "Blur" ) );
}

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

