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

#include "choqokbehaviorsettings.h"

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

using namespace Choqok;

namespace Choqok {

class BehaviorSettingsHelper
{
  public:
    BehaviorSettingsHelper() : q(0) {}
    ~BehaviorSettingsHelper() { delete q; }
    BehaviorSettings *q;
};
}

K_GLOBAL_STATIC(BehaviorSettingsHelper, s_globalBehaviorSettings)
BehaviorSettings *BehaviorSettings::self()
{
  if (!s_globalBehaviorSettings->q) {
    new BehaviorSettings;
    s_globalBehaviorSettings->q->readConfig();
  }

  return s_globalBehaviorSettings->q;
}

BehaviorSettings::BehaviorSettings(  )
  : KConfigSkeleton( QLatin1String( "choqokrc" ) )
{
  Q_ASSERT(!s_globalBehaviorSettings->q);
  s_globalBehaviorSettings->q = this;
  setCurrentGroup( QLatin1String( "Behavior" ) );

  mNotifyEnabledItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "notifyEnabled" ), mNotifyEnabled, true );
  addItem( mNotifyEnabledItem, QLatin1String( "notifyEnabled" ) );
  mShowAllNotifiesInOneItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "showAllNotifiesInOne" ), mShowAllNotifiesInOne, false );
  addItem( mShowAllNotifiesInOneItem, QLatin1String( "showAllNotifiesInOne" ) );
  mEnableSysTrayItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "enableSysTray" ), mEnableSysTray, true );
  addItem( mEnableSysTrayItem, QLatin1String( "enableSysTray" ) );
  mEnableSpellCheckerItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "enableSpellChecker" ), mEnableSpellChecker, false );
  addItem( mEnableSpellCheckerItem, QLatin1String( "enableSpellChecker" ) );
  mMarkAllAsReadOnHideToSystrayItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "markAllAsReadOnHideToSystray" ), mMarkAllAsReadOnHideToSystray, true );
  addItem( mMarkAllAsReadOnHideToSystrayItem, QLatin1String( "markAllAsReadOnHideToSystray" ) );
  mMarkAllAsReadOnExitItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "markAllAsReadOnExit" ), mMarkAllAsReadOnExit, true );
  addItem( mMarkAllAsReadOnExitItem, QLatin1String( "markAllAsReadOnExit" ) );
  mUpdateIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "updateInterval" ), mUpdateInterval, 10 );
  addItem( mUpdateIntervalItem, QLatin1String( "updateInterval" ) );
  mNotifyIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "notifyInterval" ), mNotifyInterval, 10 );
  addItem( mNotifyIntervalItem, QLatin1String( "notifyInterval" ) );
  mShowMainWinOnStartItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "showMainWinOnStart" ), mShowMainWinOnStart, true );
  addItem( mShowMainWinOnStartItem, QLatin1String( "showMainWinOnStart" ) );
  mShowSplashScreenItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "showSplashScreen" ), mShowSplashScreen, true );
  addItem( mShowSplashScreenItem, QLatin1String( "showSplashScreen" ) );
  mPositionItem = new KConfigSkeleton::ItemPoint( currentGroup(), QLatin1String( "position" ), mPosition, QPoint(-1,-1) );
  addItem( mPositionItem, QLatin1String( "position" ) );
  mUseKWalletItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "UseKWallet" ), mUseKWallet, true );
  addItem( mUseKWalletItem, QLatin1String( "UseKWallet" ) );
  mUseCustomBrowserItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "useCustomBrowser" ), mUseCustomBrowser, false );
  addItem( mUseCustomBrowserItem, QLatin1String( "useCustomBrowser" ) );
  mCustomBrowserItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "customBrowser" ), mCustomBrowser );
  addItem( mCustomBrowserItem, QLatin1String( "customBrowser" ) );
  mShortenOnPasteItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "shortenOnPaste" ), mShortenOnPaste, false );
  addItem( mShortenOnPasteItem, QLatin1String( "shortenOnPaste" ) );
  mRemoveHttpItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "removeHttp" ), mRemoveHttp, false );
  addItem( mRemoveHttpItem, QLatin1String( "removeHttp" ) );
  mShortenerPluginItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "shortenerPlugin" ), mShortenerPlugin );
  addItem( mShortenerPluginItem, QLatin1String( "shortenerPlugin" ) );
  mCountOfPostsItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "countOfPosts" ), mCountOfPosts, 20 );
  addItem( mCountOfPostsItem, QLatin1String( "countOfPosts" ) );
  mResendWithQuickPostItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "resendWithQuickPost" ), mResendWithQuickPost, false );
  addItem( mResendWithQuickPostItem, QLatin1String( "resendWithQuickPost" ) );
  mUseCustomRTItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "useCustomRT" ), mUseCustomRT, false );
  addItem( mUseCustomRTItem, QLatin1String( "useCustomRT" ) );
  mCustomRTItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "customRT" ), mCustomRT );
  addItem( mCustomRTItem, QLatin1String( "customRT" ) );
  mLastUsedUploaderPluginItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "lastUsedUploaderPlugin" ), mLastUsedUploaderPlugin );
  addItem( mLastUsedUploaderPluginItem, QLatin1String( "lastUsedUploaderPlugin" ) );
  mSpellerLanguageItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "spellerLanguage" ), mSpellerLanguage );
  addItem( mSpellerLanguageItem, QLatin1String( "spellerLanguage" ) );
  mKnotifyItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "knotify" ), mKnotify, true );
  addItem( mKnotifyItem, QLatin1String( "knotify" ) );
  mLibindicateItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "libindicate" ), mLibindicate, false );
  addItem( mLibindicateItem, QLatin1String( "libindicate" ) );

  setCurrentGroup( QLatin1String( "QuickPost" ) );

  mAllItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "All" ), mAll, false );
  addItem( mAllItem, QLatin1String( "All" ) );
  mQuickPostDialogSizeItem = new KConfigSkeleton::ItemSize( currentGroup(), QLatin1String( "QuickPostDialogSize" ), mQuickPostDialogSize, QSize(280,140) );
  addItem( mQuickPostDialogSizeItem, QLatin1String( "QuickPostDialogSize" ) );
}

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

