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

#include "dolphin_informationpanelsettings.h"

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

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

  return s_globalInformationPanelSettings()->q;
}

InformationPanelSettings::InformationPanelSettings( )
  : KConfigSkeleton( QStringLiteral( "dolphinrc" ) )
{
  Q_ASSERT(!s_globalInformationPanelSettings()->q);
  s_globalInformationPanelSettings()->q = this;
  setCurrentGroup( QStringLiteral( "InformationPanel" ) );

  KConfigSkeleton::ItemBool  *itemPreviewsShown;
  itemPreviewsShown = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "previewsShown" ), mPreviewsShown, true );
  addItem( itemPreviewsShown, QStringLiteral( "previewsShown" ) );
  KConfigSkeleton::ItemBool  *itemPreviewsAutoPlay;
  itemPreviewsAutoPlay = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "previewsAutoPlay" ), mPreviewsAutoPlay, false );
  addItem( itemPreviewsAutoPlay, QStringLiteral( "previewsAutoPlay" ) );
  KConfigSkeleton::ItemBool  *itemShowHovered;
  itemShowHovered = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showHovered" ), mShowHovered, true );
  addItem( itemShowHovered, QStringLiteral( "showHovered" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesdateFormat;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("LongFormat");
    valuesdateFormat.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ShortFormat");
    valuesdateFormat.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemDateFormat;
  itemDateFormat = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "dateFormat" ), mDateFormat, valuesdateFormat, 0 );
  addItem( itemDateFormat, QStringLiteral( "dateFormat" ) );
}

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

