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

#include "infowidgetpluginsettings.h"

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

using namespace kt;

namespace kt {

class InfoWidgetPluginSettingsHelper
{
  public:
    InfoWidgetPluginSettingsHelper() : q(0) {}
    ~InfoWidgetPluginSettingsHelper() { delete q; }
    InfoWidgetPluginSettings *q;
};
}

K_GLOBAL_STATIC(InfoWidgetPluginSettingsHelper, s_globalInfoWidgetPluginSettings)
InfoWidgetPluginSettings *InfoWidgetPluginSettings::self()
{
  if (!s_globalInfoWidgetPluginSettings->q) {
    new InfoWidgetPluginSettings;
    s_globalInfoWidgetPluginSettings->q->readConfig();
  }

  return s_globalInfoWidgetPluginSettings->q;
}

InfoWidgetPluginSettings::InfoWidgetPluginSettings(  )
  : KConfigSkeleton( QLatin1String( "ktinfowidgetpluginrc" ) )
{
  Q_ASSERT(!s_globalInfoWidgetPluginSettings->q);
  s_globalInfoWidgetPluginSettings->q = this;
  setCurrentGroup( QLatin1String( "general" ) );

  KConfigSkeleton::ItemBool  *itemShowPeerView;
  itemShowPeerView = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "showPeerView" ), mShowPeerView, true );
  addItem( itemShowPeerView, QLatin1String( "showPeerView" ) );
  KConfigSkeleton::ItemBool  *itemShowChunkView;
  itemShowChunkView = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "showChunkView" ), mShowChunkView, true );
  addItem( itemShowChunkView, QLatin1String( "showChunkView" ) );
  KConfigSkeleton::ItemBool  *itemShowTrackersView;
  itemShowTrackersView = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "showTrackersView" ), mShowTrackersView, true );
  addItem( itemShowTrackersView, QLatin1String( "showTrackersView" ) );
  KConfigSkeleton::ItemBool  *itemShowWebSeedsTab;
  itemShowWebSeedsTab = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "showWebSeedsTab" ), mShowWebSeedsTab, true );
  addItem( itemShowWebSeedsTab, QLatin1String( "showWebSeedsTab" ) );
  KConfigSkeleton::ItemColor  *itemFirstColor;
  itemFirstColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "firstColor" ), mFirstColor, QColor() );
  addItem( itemFirstColor, QLatin1String( "firstColor" ) );
  KConfigSkeleton::ItemColor  *itemLastColor;
  itemLastColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "lastColor" ), mLastColor, QColor() );
  addItem( itemLastColor, QLatin1String( "lastColor" ) );
}

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

