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

#include "dolphin_compactmodesettings.h"

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

class CompactModeSettingsHelper
{
  public:
    CompactModeSettingsHelper() : q(0) {}
    ~CompactModeSettingsHelper() { delete q; }
    CompactModeSettings *q;
};
K_GLOBAL_STATIC(CompactModeSettingsHelper, s_globalCompactModeSettings)
CompactModeSettings *CompactModeSettings::self()
{
  if (!s_globalCompactModeSettings->q) {
    new CompactModeSettings;
    s_globalCompactModeSettings->q->readConfig();
  }

  return s_globalCompactModeSettings->q;
}

CompactModeSettings::CompactModeSettings(  )
  : KConfigSkeleton( QLatin1String( "dolphinrc" ) )
{
  Q_ASSERT(!s_globalCompactModeSettings->q);
  s_globalCompactModeSettings->q = this;
  setCurrentGroup( QLatin1String( "CompactMode" ) );

  KConfigSkeleton::ItemBool  *itemUseSystemFont;
  itemUseSystemFont = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "UseSystemFont" ), mUseSystemFont, true );
  addItem( itemUseSystemFont, QLatin1String( "UseSystemFont" ) );
  KConfigSkeleton::ItemString  *itemFontFamily;
  itemFontFamily = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "FontFamily" ), mFontFamily, KGlobalSettings::generalFont().family() );
  addItem( itemFontFamily, QLatin1String( "FontFamily" ) );
  KConfigSkeleton::ItemDouble  *itemFontSize;
  itemFontSize = new KConfigSkeleton::ItemDouble( currentGroup(), QLatin1String( "FontSize" ), mFontSize, KGlobalSettings::generalFont().pointSizeF() );
  addItem( itemFontSize, QLatin1String( "FontSize" ) );
  KConfigSkeleton::ItemBool  *itemItalicFont;
  itemItalicFont = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ItalicFont" ), mItalicFont, false );
  addItem( itemItalicFont, QLatin1String( "ItalicFont" ) );
  KConfigSkeleton::ItemInt  *itemFontWeight;
  itemFontWeight = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "FontWeight" ), mFontWeight, 0 );
  addItem( itemFontWeight, QLatin1String( "FontWeight" ) );
  KConfigSkeleton::ItemInt  *itemIconSize;
  itemIconSize = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "IconSize" ), mIconSize, KIconLoader::SizeSmall );
  addItem( itemIconSize, QLatin1String( "IconSize" ) );
  KConfigSkeleton::ItemInt  *itemPreviewSize;
  itemPreviewSize = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "PreviewSize" ), mPreviewSize, KIconLoader::SizeLarge );
  addItem( itemPreviewSize, QLatin1String( "PreviewSize" ) );
  KConfigSkeleton::ItemInt  *itemMaximumTextWidthIndex;
  itemMaximumTextWidthIndex = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "MaximumTextWidthIndex" ), mMaximumTextWidthIndex, 0 );
  addItem( itemMaximumTextWidthIndex, QLatin1String( "MaximumTextWidthIndex" ) );
}

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

