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

#include "settings.h"

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

class FreeSpaceNotifierSettingsHelper
{
  public:
    FreeSpaceNotifierSettingsHelper() : q(0) {}
    ~FreeSpaceNotifierSettingsHelper() { delete q; }
    FreeSpaceNotifierSettings *q;
};
K_GLOBAL_STATIC(FreeSpaceNotifierSettingsHelper, s_globalFreeSpaceNotifierSettings)
FreeSpaceNotifierSettings *FreeSpaceNotifierSettings::self()
{
  if (!s_globalFreeSpaceNotifierSettings->q) {
    new FreeSpaceNotifierSettings;
    s_globalFreeSpaceNotifierSettings->q->readConfig();
  }

  return s_globalFreeSpaceNotifierSettings->q;
}

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

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

FreeSpaceNotifierSettings::~FreeSpaceNotifierSettings()
{
  if (!s_globalFreeSpaceNotifierSettings.isDestroyed()) {
    s_globalFreeSpaceNotifierSettings->q = 0;
  }
}

