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

#include "posteroussettings.h"

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

class PosterousSettingsHelper
{
  public:
    PosterousSettingsHelper() : q(0) {}
    ~PosterousSettingsHelper() { delete q; }
    PosterousSettings *q;
};
K_GLOBAL_STATIC(PosterousSettingsHelper, s_globalPosterousSettings)
PosterousSettings *PosterousSettings::self()
{
  if (!s_globalPosterousSettings->q) {
    new PosterousSettings;
    s_globalPosterousSettings->q->readConfig();
  }

  return s_globalPosterousSettings->q;
}

PosterousSettings::PosterousSettings(  )
  : KConfigSkeleton( QLatin1String( "choqokrc" ) )
{
  Q_ASSERT(!s_globalPosterousSettings->q);
  s_globalPosterousSettings->q = this;
  setCurrentGroup( QLatin1String( "Posterous ImageUploader" ) );

  mBasicItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "basic" ), mBasic );
  addItem( mBasicItem, QLatin1String( "basic" ) );
  mLoginItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "login" ), mLogin );
  addItem( mLoginItem, QLatin1String( "login" ) );
  mOauthItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "oauth" ), mOauth );
  addItem( mOauthItem, QLatin1String( "oauth" ) );
  mAliasItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "alias" ), mAlias );
  addItem( mAliasItem, QLatin1String( "alias" ) );
}

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

