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

#include "desktopgridconfig.h"

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

using namespace KWin;

namespace KWin {

class DesktopGridConfigHelper
{
  public:
    DesktopGridConfigHelper() : q(0) {}
    ~DesktopGridConfigHelper() { delete q; }
    DesktopGridConfig *q;
};
}

K_GLOBAL_STATIC(DesktopGridConfigHelper, s_globalDesktopGridConfig)
DesktopGridConfig *DesktopGridConfig::self()
{
  if (!s_globalDesktopGridConfig->q) {
    new DesktopGridConfig;
    s_globalDesktopGridConfig->q->readConfig();
  }

  return s_globalDesktopGridConfig->q;
}

DesktopGridConfig::DesktopGridConfig(  )
  : KConfigSkeleton( QLatin1String( "kwinrc" ) )
{
  Q_ASSERT(!s_globalDesktopGridConfig->q);
  s_globalDesktopGridConfig->q = this;
  setCurrentGroup( QLatin1String( "Effect-DesktopGrid" ) );

  QList<int> defaultBorderActivate;

  KConfigSkeleton::ItemIntList  *itemBorderActivate;
  itemBorderActivate = new KConfigSkeleton::ItemIntList( currentGroup(), QLatin1String( "BorderActivate" ), mBorderActivate, defaultBorderActivate );
  addItem( itemBorderActivate, QLatin1String( "BorderActivate" ) );
  KConfigSkeleton::ItemInt  *itemZoomDuration;
  itemZoomDuration = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "ZoomDuration" ), mZoomDuration, 0 );
  addItem( itemZoomDuration, QLatin1String( "ZoomDuration" ) );
  KConfigSkeleton::ItemInt  *itemBorderWidth;
  itemBorderWidth = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "BorderWidth" ), mBorderWidth, 10 );
  addItem( itemBorderWidth, QLatin1String( "BorderWidth" ) );
  KConfigSkeleton::ItemInt  *itemDesktopNameAlignment;
  itemDesktopNameAlignment = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "DesktopNameAlignment" ), mDesktopNameAlignment, 0 );
  addItem( itemDesktopNameAlignment, QLatin1String( "DesktopNameAlignment" ) );
  KConfigSkeleton::ItemInt  *itemLayoutMode;
  itemLayoutMode = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "LayoutMode" ), mLayoutMode, 0 );
  addItem( itemLayoutMode, QLatin1String( "LayoutMode" ) );
  KConfigSkeleton::ItemInt  *itemCustomLayoutRows;
  itemCustomLayoutRows = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "CustomLayoutRows" ), mCustomLayoutRows, 2 );
  addItem( itemCustomLayoutRows, QLatin1String( "CustomLayoutRows" ) );
  KConfigSkeleton::ItemBool  *itemPresentWindows;
  itemPresentWindows = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "PresentWindows" ), mPresentWindows, true );
  addItem( itemPresentWindows, QLatin1String( "PresentWindows" ) );
}

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

