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

#include "kruler.h"

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

class RulerSettingsHelper
{
  public:
    RulerSettingsHelper() : q(0) {}
    ~RulerSettingsHelper() { delete q; }
    RulerSettings *q;
};
Q_GLOBAL_STATIC(RulerSettingsHelper, s_globalRulerSettings)
RulerSettings *RulerSettings::self()
{
  if (!s_globalRulerSettings()->q) {
    new RulerSettings;
    s_globalRulerSettings()->q->read();
  }

  return s_globalRulerSettings()->q;
}

RulerSettings::RulerSettings(  )
  : KConfigSkeleton( QLatin1String( "krulerrc" ) )
{
  Q_ASSERT(!s_globalRulerSettings()->q);
  s_globalRulerSettings()->q = this;
  setCurrentGroup( QLatin1String( "StoredSettings" ) );

  KConfigSkeleton::ItemColor  *itemBgColor;
  itemBgColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "BgColor" ), mBgColor, QColor(255, 200, 80) );
  addItem( itemBgColor, QLatin1String( "BgColor" ) );
  KConfigSkeleton::ItemInt  *itemLength;
  itemLength = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Length" ), mLength, 600 );
  addItem( itemLength, QLatin1String( "Length" ) );
  KConfigSkeleton::ItemFont  *itemScaleFont;
  itemScaleFont = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "ScaleFont" ), mScaleFont, QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont) );
  addItem( itemScaleFont, QLatin1String( "ScaleFont" ) );
  KConfigSkeleton::ItemInt  *itemOrientation;
  itemOrientation = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Orientation" ), mOrientation, 2 );
  addItem( itemOrientation, QLatin1String( "Orientation" ) );
  KConfigSkeleton::ItemBool  *itemLeftToRight;
  itemLeftToRight = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "LeftToRight" ), mLeftToRight, true );
  addItem( itemLeftToRight, QLatin1String( "LeftToRight" ) );
  KConfigSkeleton::ItemInt  *itemOffset;
  itemOffset = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Offset" ), mOffset, 0 );
  addItem( itemOffset, QLatin1String( "Offset" ) );
  KConfigSkeleton::ItemBool  *itemRelativeScale;
  itemRelativeScale = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "RelativeScale" ), mRelativeScale, false );
  addItem( itemRelativeScale, QLatin1String( "RelativeScale" ) );
  KConfigSkeleton::ItemBool  *itemTrayIcon;
  itemTrayIcon = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "TrayIcon" ), mTrayIcon, false );
  addItem( itemTrayIcon, QLatin1String( "TrayIcon" ) );
  KConfigSkeleton::ItemInt  *itemOpacity;
  itemOpacity = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Opacity" ), mOpacity, 255 );
  addItem( itemOpacity, QLatin1String( "Opacity" ) );
  KConfigSkeleton::ItemBool  *itemRotateButtonsVisible;
  itemRotateButtonsVisible = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "RotateButtonsVisible" ), mRotateButtonsVisible, false );
  addItem( itemRotateButtonsVisible, QLatin1String( "RotateButtonsVisible" ) );
  KConfigSkeleton::ItemBool  *itemCloseButtonVisible;
  itemCloseButtonVisible = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "CloseButtonVisible" ), mCloseButtonVisible, false );
  addItem( itemCloseButtonVisible, QLatin1String( "CloseButtonVisible" ) );
  KConfigSkeleton::ItemBool  *itemNativeMoving;
  itemNativeMoving = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "NativeMoving" ), mNativeMoving, false );
  addItem( itemNativeMoving, QLatin1String( "NativeMoving" ) );
}

RulerSettings::~RulerSettings()
{
  s_globalRulerSettings()->q = 0;
}

