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

#include "dolphin_compactmodesettings.h"

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

class CompactModeSettingsHelper
{
  public:
    CompactModeSettingsHelper() : q(nullptr) {}
    ~CompactModeSettingsHelper() { delete q; }
    CompactModeSettings *q;
};
Q_GLOBAL_STATIC(CompactModeSettingsHelper, s_globalCompactModeSettings)
CompactModeSettings *CompactModeSettings::self()
{
  if (!s_globalCompactModeSettings()->q) {
    new CompactModeSettings;
    s_globalCompactModeSettings()->q->read();
  }

  return s_globalCompactModeSettings()->q;
}

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

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

CompactModeSettings::~CompactModeSettings()
{
  s_globalCompactModeSettings()->q = nullptr;
}

