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

#include "dolphin_placespanelsettings.h"

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

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

  return s_globalPlacesPanelSettings()->q;
}

PlacesPanelSettings::PlacesPanelSettings( )
  : KConfigSkeleton( QStringLiteral( "dolphinrc" ) )
{
  Q_ASSERT(!s_globalPlacesPanelSettings()->q);
  s_globalPlacesPanelSettings()->q = this;
  setCurrentGroup( QStringLiteral( "PlacesPanel" ) );

  KConfigSkeleton::ItemInt  *itemIconSize;
  itemIconSize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "IconSize" ), mIconSize, KIconLoader::SizeSmallMedium );
  addItem( itemIconSize, QStringLiteral( "IconSize" ) );
}

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

