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

#include "showfpsconfig.h"

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

using namespace KWin;

namespace KWin {

class ShowFpsConfigHelper
{
  public:
    ShowFpsConfigHelper() : q(0) {}
    ~ShowFpsConfigHelper() { delete q; }
    ShowFpsConfig *q;
};
}

K_GLOBAL_STATIC(ShowFpsConfigHelper, s_globalShowFpsConfig)
ShowFpsConfig *ShowFpsConfig::self()
{
  if (!s_globalShowFpsConfig->q) {
    new ShowFpsConfig;
    s_globalShowFpsConfig->q->readConfig();
  }

  return s_globalShowFpsConfig->q;
}

ShowFpsConfig::ShowFpsConfig(  )
  : KConfigSkeleton( QLatin1String( "kwinrc" ) )
{
  Q_ASSERT(!s_globalShowFpsConfig->q);
  s_globalShowFpsConfig->q = this;
  setCurrentGroup( QLatin1String( "Effect-ShowFps" ) );

  KConfigSkeleton::ItemInt  *itemTextPosition;
  itemTextPosition = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "TextPosition" ), mTextPosition, 0 );
  addItem( itemTextPosition, QLatin1String( "TextPosition" ) );
  KConfigSkeleton::ItemFont  *itemTextFont;
  itemTextFont = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "TextFont" ), mTextFont );
  addItem( itemTextFont, QLatin1String( "TextFont" ) );
  KConfigSkeleton::ItemColor  *itemTextColor;
  itemTextColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "TextColor" ), mTextColor, QColor( "invalid" ) );
  addItem( itemTextColor, QLatin1String( "TextColor" ) );
  KConfigSkeleton::ItemDouble  *itemTextAlpha;
  itemTextAlpha = new KConfigSkeleton::ItemDouble( currentGroup(), QLatin1String( "TextAlpha" ), mTextAlpha, 1.0 );
  addItem( itemTextAlpha, QLatin1String( "TextAlpha" ) );
  KConfigSkeleton::ItemDouble  *itemAlpha;
  itemAlpha = new KConfigSkeleton::ItemDouble( currentGroup(), QLatin1String( "Alpha" ), mAlpha, 0.5 );
  addItem( itemAlpha, QLatin1String( "Alpha" ) );
  KConfigSkeleton::ItemInt  *itemX;
  itemX = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "X" ), mX, -10000 );
  addItem( itemX, QLatin1String( "X" ) );
  KConfigSkeleton::ItemInt  *itemY;
  itemY = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Y" ), mY, 0 );
  addItem( itemY, QLatin1String( "Y" ) );
}

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

