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

#include "settings.h"

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

class FreeSpaceNotifierSettingsHelper
{
  public:
    FreeSpaceNotifierSettingsHelper() : q(nullptr) {}
    ~FreeSpaceNotifierSettingsHelper() { delete q; }
    FreeSpaceNotifierSettings *q;
};
Q_GLOBAL_STATIC(FreeSpaceNotifierSettingsHelper, s_globalFreeSpaceNotifierSettings)
FreeSpaceNotifierSettings *FreeSpaceNotifierSettings::self()
{
  if (!s_globalFreeSpaceNotifierSettings()->q) {
    new FreeSpaceNotifierSettings;
    s_globalFreeSpaceNotifierSettings()->q->read();
  }

  return s_globalFreeSpaceNotifierSettings()->q;
}

FreeSpaceNotifierSettings::FreeSpaceNotifierSettings(  )
  : KConfigSkeleton( QStringLiteral( "freespacenotifierrc" ) )
{
  Q_ASSERT(!s_globalFreeSpaceNotifierSettings()->q);
  s_globalFreeSpaceNotifierSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemInt  *itemMinimumSpace;
  itemMinimumSpace = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "minimumSpace" ), mMinimumSpace, 200 );
  itemMinimumSpace->setMinValue(1);
  itemMinimumSpace->setMaxValue(100000);
  addItem( itemMinimumSpace, QStringLiteral( "minimumSpace" ) );
  KConfigSkeleton::ItemBool  *itemEnableNotification;
  itemEnableNotification = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "enableNotification" ), mEnableNotification, 1 );
  addItem( itemEnableNotification, QStringLiteral( "enableNotification" ) );
}

FreeSpaceNotifierSettings::~FreeSpaceNotifierSettings()
{
  s_globalFreeSpaceNotifierSettings()->q = nullptr;
}

