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

#include "magnifierconfig.h"

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

using namespace KWin;

namespace KWin {

class MagnifierConfigHelper
{
  public:
    MagnifierConfigHelper() : q(0) {}
    ~MagnifierConfigHelper() { delete q; }
    MagnifierConfig *q;
};
}

K_GLOBAL_STATIC(MagnifierConfigHelper, s_globalMagnifierConfig)
MagnifierConfig *MagnifierConfig::self()
{
  if (!s_globalMagnifierConfig->q) {
    new MagnifierConfig;
    s_globalMagnifierConfig->q->readConfig();
  }

  return s_globalMagnifierConfig->q;
}

MagnifierConfig::MagnifierConfig(  )
  : KConfigSkeleton( QLatin1String( "kwinrc" ) )
{
  Q_ASSERT(!s_globalMagnifierConfig->q);
  s_globalMagnifierConfig->q = this;
  setCurrentGroup( QLatin1String( "Effect-Magnifier" ) );

  KConfigSkeleton::ItemUInt  *itemWidth;
  itemWidth = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "Width" ), mWidth, 200 );
  addItem( itemWidth, QLatin1String( "Width" ) );
  KConfigSkeleton::ItemUInt  *itemHeight;
  itemHeight = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "Height" ), mHeight, 200 );
  addItem( itemHeight, QLatin1String( "Height" ) );
  KConfigSkeleton::ItemDouble  *itemInitialZoom;
  itemInitialZoom = new KConfigSkeleton::ItemDouble( currentGroup(), QLatin1String( "InitialZoom" ), mInitialZoom, 1.0 );
  addItem( itemInitialZoom, QLatin1String( "InitialZoom" ) );
}

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

