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

#include "dolphin_iconsmodesettings.h"

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

class IconsModeSettingsHelper
{
  public:
    IconsModeSettingsHelper() : q(nullptr) {}
    ~IconsModeSettingsHelper() { delete q; q = nullptr; }
    IconsModeSettingsHelper(const IconsModeSettingsHelper&) = delete;
    IconsModeSettingsHelper& operator=(const IconsModeSettingsHelper&) = delete;
    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::ItemFont  *itemViewFont;
  itemViewFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "ViewFont" ), mViewFont, QFont() );
  addItem( itemViewFont, QStringLiteral( "ViewFont" ) );
  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, 3 );
  addItem( itemMaximumTextLines, QStringLiteral( "MaximumTextLines" ) );
}

IconsModeSettings::~IconsModeSettings()
{
  if (s_globalIconsModeSettings.exists() && !s_globalIconsModeSettings.isDestroyed()) {
    s_globalIconsModeSettings()->q = nullptr;
  }
}

