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

#include "settings.h"

#include <klocale.h>

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

class SettingsHelper
{
  public:
    SettingsHelper() : q(0) {}
    ~SettingsHelper() { delete q; }
    Settings *q;
};
K_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
Settings *Settings::self()
{
  if (!s_globalSettings->q) {
    new Settings;
    s_globalSettings->q->readConfig();
  }

  return s_globalSettings->q;
}

Settings::Settings(  )
  : KConfigSkeleton()
{
  Q_ASSERT(!s_globalSettings->q);
  s_globalSettings->q = this;
  setCurrentGroup( QLatin1String( "General" ) );

  mPathItem = new KConfigSkeleton::ItemPath( currentGroup(), QLatin1String( "Path" ), mPath );
  mPathItem->setLabel( i18n("Path to the Skrooge document.") );
  addItem( mPathItem, QLatin1String( "Path" ) );
  mPasswordItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Password" ), mPassword );
  mPasswordItem->setLabel( i18n("Password of the Skrooge document.") );
  addItem( mPasswordItem, QLatin1String( "Password" ) );
}

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

