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

#include "dolphin_contentdisplaysettings.h"

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

class ContentDisplaySettingsHelper
{
  public:
    ContentDisplaySettingsHelper() noexcept : q(nullptr) {}
    ~ContentDisplaySettingsHelper() noexcept { delete q; q = nullptr; }
    ContentDisplaySettingsHelper(const ContentDisplaySettingsHelper&) = delete;
    ContentDisplaySettingsHelper& operator=(const ContentDisplaySettingsHelper&) = delete;
    ContentDisplaySettings *q;
};
Q_GLOBAL_STATIC(ContentDisplaySettingsHelper, s_globalContentDisplaySettings)
ContentDisplaySettings *ContentDisplaySettings::self()
{
  if (!s_globalContentDisplaySettings()->q) {
    new ContentDisplaySettings;
    s_globalContentDisplaySettings()->q->read();
  }

  return s_globalContentDisplaySettings()->q;
}

ContentDisplaySettings::ContentDisplaySettings( )
  : KConfigSkeleton( QStringLiteral( "dolphinrc" ) )
{
  Q_ASSERT(!s_globalContentDisplaySettings()->q);
  s_globalContentDisplaySettings()->q = this;
  setCurrentGroup( QStringLiteral( "ContentDisplay" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesDirectorySizeMode;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ContentCount");
    valuesDirectorySizeMode.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ContentSize");
    valuesDirectorySizeMode.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("None");
    valuesDirectorySizeMode.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemDirectorySizeMode;
  itemDirectorySizeMode = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "DirectorySizeMode" ), mDirectorySizeMode, valuesDirectorySizeMode, EnumDirectorySizeMode::ContentCount );
  addItem( itemDirectorySizeMode, QStringLiteral( "DirectorySizeMode" ) );
  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" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesUsePermissionsFormat;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("SymbolicFormat");
    valuesUsePermissionsFormat.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("NumericFormat");
    valuesUsePermissionsFormat.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("CombinedFormat");
    valuesUsePermissionsFormat.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemUsePermissionsFormat;
  itemUsePermissionsFormat = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "UsePermissionsFormat" ), mUsePermissionsFormat, valuesUsePermissionsFormat, 0 );
  addItem( itemUsePermissionsFormat, QStringLiteral( "UsePermissionsFormat" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesElidingMode;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Right");
    valuesElidingMode.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Middle");
    valuesElidingMode.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemElidingMode;
  itemElidingMode = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "ElidingMode" ), mElidingMode, valuesElidingMode, Middle );
  addItem( itemElidingMode, QStringLiteral( "ElidingMode" ) );
}

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

