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

#include "dolphin_iconsmodesettings.h"

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

class IconsModeSettingsHelper
{
  public:
    IconsModeSettingsHelper() : q(nullptr) {}
    ~IconsModeSettingsHelper() { delete q; }
    IconsModeSettings *q;
};
Q_GLOBAL_STATIC(IconsModeSettingsHelper, s_globalIconsModeSettings)
IconsModeSettings *IconsModeSettings::self()
{
  if (!s_globalIconsModeSettings()->q) {
    new IconsModeSettings;
    s_globalIconsModeSettings()->q->read();
  }

  return s_globalIconsModeSettings()->q;
}

IconsModeSettings::IconsModeSettings(  )
  : KConfigSkeleton( QStringLiteral( "dolphinrc" ) )
{
  Q_ASSERT(!s_globalIconsModeSettings()->q);
  s_globalIconsModeSettings()->q = this;
  setCurrentGroup( QStringLiteral( "IconsMode" ) );

  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::SizeMedium );
  addItem( itemIconSize, QStringLiteral( "IconSize" ) );
  KConfigSkeleton::ItemInt  *itemPreviewSize;
  itemPreviewSize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "PreviewSize" ), mPreviewSize, KIconLoader::SizeHuge );
  addItem( itemPreviewSize, QStringLiteral( "PreviewSize" ) );
  KConfigSkeleton::ItemInt  *itemTextWidthIndex;
  itemTextWidthIndex = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "TextWidthIndex" ), mTextWidthIndex, 1 );
  addItem( itemTextWidthIndex, QStringLiteral( "TextWidthIndex" ) );
  KConfigSkeleton::ItemInt  *itemMaximumTextLines;
  itemMaximumTextLines = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MaximumTextLines" ), mMaximumTextLines, 0 );
  addItem( itemMaximumTextLines, QStringLiteral( "MaximumTextLines" ) );
}

IconsModeSettings::~IconsModeSettings()
{
  s_globalIconsModeSettings()->q = nullptr;
}

