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

#include "magnetgeneratorpluginsettings.h"

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

using namespace kt;

namespace kt {

class MagnetGeneratorPluginSettingsHelper
{
  public:
    MagnetGeneratorPluginSettingsHelper() : q(0) {}
    ~MagnetGeneratorPluginSettingsHelper() { delete q; }
    MagnetGeneratorPluginSettings *q;
};
}

K_GLOBAL_STATIC(MagnetGeneratorPluginSettingsHelper, s_globalMagnetGeneratorPluginSettings)
MagnetGeneratorPluginSettings *MagnetGeneratorPluginSettings::self()
{
  if (!s_globalMagnetGeneratorPluginSettings->q) {
    new MagnetGeneratorPluginSettings;
    s_globalMagnetGeneratorPluginSettings->q->readConfig();
  }

  return s_globalMagnetGeneratorPluginSettings->q;
}

MagnetGeneratorPluginSettings::MagnetGeneratorPluginSettings(  )
  : KConfigSkeleton( QLatin1String( "ktmagnetgeneratorpluginrc" ) )
{
  Q_ASSERT(!s_globalMagnetGeneratorPluginSettings->q);
  s_globalMagnetGeneratorPluginSettings->q = this;
  setCurrentGroup( QLatin1String( "general" ) );

  KConfigSkeleton::ItemBool  *itemTorrenttracker;
  itemTorrenttracker = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "torrenttracker" ), mTorrenttracker, true );
  addItem( itemTorrenttracker, QLatin1String( "torrenttracker" ) );
  KConfigSkeleton::ItemBool  *itemCustomtracker;
  itemCustomtracker = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "customtracker" ), mCustomtracker, false );
  addItem( itemCustomtracker, QLatin1String( "customtracker" ) );
  KConfigSkeleton::ItemString  *itemTr;
  itemTr = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "tr" ), mTr, QLatin1String( "http://tracker.openbittorrent.com/announce" ) );
  addItem( itemTr, QLatin1String( "tr" ) );
  KConfigSkeleton::ItemBool  *itemDn;
  itemDn = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "dn" ), mDn, true );
  addItem( itemDn, QLatin1String( "dn" ) );
  KConfigSkeleton::ItemBool  *itemPopup;
  itemPopup = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "popup" ), mPopup, true );
  addItem( itemPopup, QLatin1String( "popup" ) );
  KConfigSkeleton::ItemBool  *itemOnlypublic;
  itemOnlypublic = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "onlypublic" ), mOnlypublic, true );
  addItem( itemOnlypublic, QLatin1String( "onlypublic" ) );
}

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

