// This file is generated by kconfig_compiler_kf5 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  *itemSidePadding;
  itemSidePadding = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "SidePadding" ), mSidePadding, 20 );
  addItem( itemSidePadding, QStringLiteral( "SidePadding" ) );
  KConfigSkeleton::ItemBool  *itemExpandableFolders;
  itemExpandableFolders = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ExpandableFolders" ), mExpandableFolders, true );
  addItem( itemExpandableFolders, QStringLiteral( "ExpandableFolders" ) );
  KConfigSkeleton::ItemBool  *itemDirectorySizeCount;
  itemDirectorySizeCount = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DirectorySizeCount" ), mDirectorySizeCount, true );
  addItem( itemDirectorySizeCount, QStringLiteral( "DirectorySizeCount" ) );
  KConfigSkeleton::ItemUInt  *itemRecursiveDirectorySizeLimit;
  itemRecursiveDirectorySizeLimit = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "RecursiveDirectorySizeLimit" ), mRecursiveDirectorySizeLimit, 10 );
  addItem( itemRecursiveDirectorySizeLimit, QStringLiteral( "RecursiveDirectorySizeLimit" ) );
  KConfigSkeleton::ItemBool  *itemUseShortRelativeDates;
  itemUseShortRelativeDates = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseShortRelativeDates" ), mUseShortRelativeDates, true );
  addItem( itemUseShortRelativeDates, QStringLiteral( "UseShortRelativeDates" ) );
}

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

