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

#include "choqokappearancesettings.h"

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

using namespace Choqok;

namespace Choqok {

class AppearanceSettingsHelper
{
  public:
    AppearanceSettingsHelper() : q(0) {}
    ~AppearanceSettingsHelper() { delete q; }
    AppearanceSettings *q;
};
}

K_GLOBAL_STATIC(AppearanceSettingsHelper, s_globalAppearanceSettings)
AppearanceSettings *AppearanceSettings::self()
{
  if (!s_globalAppearanceSettings->q) {
    new AppearanceSettings;
    s_globalAppearanceSettings->q->readConfig();
  }

  return s_globalAppearanceSettings->q;
}

AppearanceSettings::AppearanceSettings(  )
  : KConfigSkeleton( QLatin1String( "choqokrc" ) )
{
  Q_ASSERT(!s_globalAppearanceSettings->q);
  s_globalAppearanceSettings->q = this;
  setCurrentGroup( QLatin1String( "Appearance" ) );

  mIsEmoticonsEnabledItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "isEmoticonsEnabled" ), mIsEmoticonsEnabled, true );
  addItem( mIsEmoticonsEnabledItem, QLatin1String( "isEmoticonsEnabled" ) );
  mIsCustomUiItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "isCustomUi" ), mIsCustomUi, false );
  addItem( mIsCustomUiItem, QLatin1String( "isCustomUi" ) );
  mReadBackColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "readBackColor" ), mReadBackColor, QColor( "white" ) );
  addItem( mReadBackColorItem, QLatin1String( "readBackColor" ) );
  mUnreadBackColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "unreadBackColor" ), mUnreadBackColor, QColor( "yellow" ) );
  addItem( mUnreadBackColorItem, QLatin1String( "unreadBackColor" ) );
  mOwnBackColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "ownBackColor" ), mOwnBackColor, QColor( "white" ) );
  addItem( mOwnBackColorItem, QLatin1String( "ownBackColor" ) );
  mReadForeColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "readForeColor" ), mReadForeColor, QColor( "Black" ) );
  addItem( mReadForeColorItem, QLatin1String( "readForeColor" ) );
  mUnreadForeColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "unreadForeColor" ), mUnreadForeColor, QColor( "Black" ) );
  addItem( mUnreadForeColorItem, QLatin1String( "unreadForeColor" ) );
  mOwnForeColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "ownForeColor" ), mOwnForeColor, QColor( "Black" ) );
  addItem( mOwnForeColorItem, QLatin1String( "ownForeColor" ) );
  mShowRetweetsInChoqokWayItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "showRetweetsInChoqokWay" ), mShowRetweetsInChoqokWay, false );
  addItem( mShowRetweetsInChoqokWayItem, QLatin1String( "showRetweetsInChoqokWay" ) );
  mUseReverseOrderItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "useReverseOrder" ), mUseReverseOrder, false );
  addItem( mUseReverseOrderItem, QLatin1String( "useReverseOrder" ) );
  mFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "font" ), mFont, QFont("DejaVu Sans", 9) );
  addItem( mFontItem, QLatin1String( "font" ) );

  setCurrentGroup( QLatin1String( "TabBar" ) );

  mTabBarPositionItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "TabBarPosition" ), mTabBarPosition, 2 );
  addItem( mTabBarPositionItem, QLatin1String( "TabBarPosition" ) );
  mTabBarSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "TabBarSize" ), mTabBarSize, 22 );
  addItem( mTabBarSizeItem, QLatin1String( "TabBarSize" ) );
  mTabBarIsStyledItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "TabBarIsStyled" ), mTabBarIsStyled, true );
  addItem( mTabBarIsStyledItem, QLatin1String( "TabBarIsStyled" ) );
}

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

