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

#include "glideconfig.h"

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

using namespace KWin;

namespace KWin {

class GlideConfigHelper
{
  public:
    GlideConfigHelper() : q(0) {}
    ~GlideConfigHelper() { delete q; }
    GlideConfig *q;
};
}

K_GLOBAL_STATIC(GlideConfigHelper, s_globalGlideConfig)
GlideConfig *GlideConfig::self()
{
  if (!s_globalGlideConfig->q) {
    new GlideConfig;
    s_globalGlideConfig->q->readConfig();
  }

  return s_globalGlideConfig->q;
}

GlideConfig::GlideConfig(  )
  : KConfigSkeleton( QLatin1String( "kwinrc" ) )
{
  Q_ASSERT(!s_globalGlideConfig->q);
  s_globalGlideConfig->q = this;
  setCurrentGroup( QLatin1String( "Effect-Glide" ) );

  KConfigSkeleton::ItemUInt  *itemDuration;
  itemDuration = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "Duration" ), mDuration, 0 );
  addItem( itemDuration, QLatin1String( "Duration" ) );
  KConfigSkeleton::ItemInt  *itemGlideEffect;
  itemGlideEffect = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "GlideEffect" ), mGlideEffect, 0 );
  addItem( itemGlideEffect, QLatin1String( "GlideEffect" ) );
  KConfigSkeleton::ItemInt  *itemGlideAngle;
  itemGlideAngle = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "GlideAngle" ), mGlideAngle, -90 );
  addItem( itemGlideAngle, QLatin1String( "GlideAngle" ) );
}

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

