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

#include "dolphin_detailsmodesettings.h"

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

class DetailsModeSettingsHelper
{
  public:
    DetailsModeSettingsHelper() : q(nullptr) {}
    ~DetailsModeSettingsHelper() { delete q; q = nullptr; }
    DetailsModeSettingsHelper(const DetailsModeSettingsHelper&) = delete;
    DetailsModeSettingsHelper& operator=(const DetailsModeSettingsHelper&) = delete;
    DetailsModeSettings *q;
};
Q_GLOBAL_STATIC(DetailsModeSettingsHelper, s_globalDetailsModeSettings)
DetailsModeSettings *DetailsModeSettings::self()
{
  if (!s_globalDetailsModeSettings()->q) {
    new DetailsModeSettings;
    s_globalDetailsModeSettings()->q->read();
  }

  return s_globalDetailsModeSettings()->q;
}

DetailsModeSettings::DetailsModeSettings( )
  : KConfigSkeleton( QStringLiteral( "dolphinrc" ) )
{
  Q_ASSERT(!s_globalDetailsModeSettings()->q);
  s_globalDetailsModeSettings()->q = this;
  setCurrentGroup( QStringLiteral( "DetailsMode" ) );

  KConfigSkeleton::ItemFont  *itemViewFont;
  itemViewFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "ViewFont" ), mViewFont, QFont() );
  addItem( itemViewFont, QStringLiteral( "ViewFont" ) );
  KConfigSkeleton::ItemBool  *itemUseSystemFont;
  itemUseSystemFont = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseSystemFont" ), mUseSystemFont, true );
  addItem( itemUseSystemFont, QStringLiteral( "UseSystemFont" ) );
  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" ) );
  QList<int> defaultColumnPositions;
  defaultColumnPositions.append( 0 );
  defaultColumnPositions.append( 1 );
  defaultColumnPositions.append( 2 );
  defaultColumnPositions.append( 3 );
  defaultColumnPositions.append( 4 );
  defaultColumnPositions.append( 5 );
  defaultColumnPositions.append( 6 );
  defaultColumnPositions.append( 7 );
  defaultColumnPositions.append( 8 );

  KConfigSkeleton::ItemIntList  *itemColumnPositions;
  itemColumnPositions = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "ColumnPositions" ), mColumnPositions, defaultColumnPositions );
  addItem( itemColumnPositions, QStringLiteral( "ColumnPositions" ) );
  KConfigSkeleton::ItemUInt  *itemLeftPadding;
  itemLeftPadding = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "LeftPadding" ), mLeftPadding, 20 );
  addItem( itemLeftPadding, QStringLiteral( "LeftPadding" ) );
  KConfigSkeleton::ItemUInt  *itemRightPadding;
  itemRightPadding = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "RightPadding" ), mRightPadding, 20 );
  addItem( itemRightPadding, QStringLiteral( "RightPadding" ) );
  KConfigSkeleton::ItemBool  *itemHighlightEntireRow;
  itemHighlightEntireRow = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "HighlightEntireRow" ), mHighlightEntireRow, true );
  addItem( itemHighlightEntireRow, QStringLiteral( "HighlightEntireRow" ) );
  KConfigSkeleton::ItemBool  *itemExpandableFolders;
  itemExpandableFolders = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ExpandableFolders" ), mExpandableFolders, true );
  addItem( itemExpandableFolders, QStringLiteral( "ExpandableFolders" ) );
}

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

