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

#include "dolphin_folderspanelsettings.h"

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

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

  return s_globalFoldersPanelSettings()->q;
}

FoldersPanelSettings::FoldersPanelSettings( )
  : KConfigSkeleton( QStringLiteral( "dolphinrc" ) )
{
  Q_ASSERT(!s_globalFoldersPanelSettings()->q);
  s_globalFoldersPanelSettings()->q = this;
  setCurrentGroup( QStringLiteral( "FoldersPanel" ) );

  KConfigSkeleton::ItemBool  *itemHiddenFilesShown;
  itemHiddenFilesShown = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "HiddenFilesShown" ), mHiddenFilesShown, false );
  addItem( itemHiddenFilesShown, QStringLiteral( "HiddenFilesShown" ) );
  KConfigSkeleton::ItemBool  *itemLimitFoldersPanelToHome;
  itemLimitFoldersPanelToHome = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "LimitFoldersPanelToHome" ), mLimitFoldersPanelToHome, true );
  addItem( itemLimitFoldersPanelToHome, QStringLiteral( "LimitFoldersPanelToHome" ) );
  KConfigSkeleton::ItemBool  *itemAutoScrolling;
  itemAutoScrolling = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoScrolling" ), mAutoScrolling, true );
  addItem( itemAutoScrolling, QStringLiteral( "AutoScrolling" ) );
}

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

