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

#include "dolphin_compactmodesettings.h"

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

class CompactModeSettingsHelper
{
  public:
    CompactModeSettingsHelper() : q(nullptr) {}
    ~CompactModeSettingsHelper() { delete q; q = nullptr; }
    CompactModeSettingsHelper(const CompactModeSettingsHelper&) = delete;
    CompactModeSettingsHelper& operator=(const CompactModeSettingsHelper&) = delete;
    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::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::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()
{
  if (s_globalCompactModeSettings.exists() && !s_globalCompactModeSettings.isDestroyed()) {
    s_globalCompactModeSettings()->q = nullptr;
  }
}

