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

#include "resourcebasesettings.h"

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

using namespace Akonadi;

namespace Akonadi {

class ResourceBaseSettingsHelper
{
  public:
    ResourceBaseSettingsHelper() : q(0) {}
    ~ResourceBaseSettingsHelper() { delete q; }
    ResourceBaseSettings *q;
};
}

K_GLOBAL_STATIC(ResourceBaseSettingsHelper, s_globalResourceBaseSettings)
ResourceBaseSettings *ResourceBaseSettings::self()
{
  if (!s_globalResourceBaseSettings->q) {
    new ResourceBaseSettings;
    s_globalResourceBaseSettings->q->readConfig();
  }

  return s_globalResourceBaseSettings->q;
}

ResourceBaseSettings::ResourceBaseSettings(  )
  : KConfigSkeleton( QLatin1String( "resourcebaserc" ) )
{
  Q_ASSERT(!s_globalResourceBaseSettings->q);
  s_globalResourceBaseSettings->q = this;
  setCurrentGroup( QLatin1String( "ConfigurationDialogRestrictions" ) );

  mMinimumCheckIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "MinimumCheckInterval" ), mMinimumCheckInterval, 5 );
  addItem( mMinimumCheckIntervalItem, QLatin1String( "MinimumCheckInterval" ) );
}

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

