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

#include "statspluginsettings.h"

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

using namespace kt;

namespace kt {

class StatsPluginSettingsHelper
{
  public:
    StatsPluginSettingsHelper() : q(0) {}
    ~StatsPluginSettingsHelper() { delete q; }
    StatsPluginSettings *q;
};
}

K_GLOBAL_STATIC(StatsPluginSettingsHelper, s_globalStatsPluginSettings)
StatsPluginSettings *StatsPluginSettings::self()
{
  if (!s_globalStatsPluginSettings->q) {
    new StatsPluginSettings;
    s_globalStatsPluginSettings->q->readConfig();
  }

  return s_globalStatsPluginSettings->q;
}

StatsPluginSettings::StatsPluginSettings(  )
  : KConfigSkeleton( QLatin1String( "ktstatspluginrc" ) )
{
  Q_ASSERT(!s_globalStatsPluginSettings->q);
  s_globalStatsPluginSettings->q = this;
  setCurrentGroup( QLatin1String( "general" ) );

  KConfigSkeleton::ItemUInt  *itemUpdateEveryGuiUpdates;
  itemUpdateEveryGuiUpdates = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "UpdateEveryGuiUpdates" ), mUpdateEveryGuiUpdates, 2 );
  addItem( itemUpdateEveryGuiUpdates, QLatin1String( "UpdateEveryGuiUpdates" ) );
  KConfigSkeleton::ItemUInt  *itemDataGatherIval;
  itemDataGatherIval = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "DataGatherIval" ), mDataGatherIval, 750 );
  addItem( itemDataGatherIval, QLatin1String( "DataGatherIval" ) );
  KConfigSkeleton::ItemUInt  *itemMaxMode;
  itemMaxMode = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "MaxMode" ), mMaxMode, 1 );
  addItem( itemMaxMode, QLatin1String( "MaxMode" ) );
  KConfigSkeleton::ItemBool  *itemShowSeedsInSwarms;
  itemShowSeedsInSwarms = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShowSeedsInSwarms" ), mShowSeedsInSwarms, false );
  addItem( itemShowSeedsInSwarms, QLatin1String( "ShowSeedsInSwarms" ) );
  KConfigSkeleton::ItemBool  *itemShowLeechersInSwarms;
  itemShowLeechersInSwarms = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShowLeechersInSwarms" ), mShowLeechersInSwarms, false );
  addItem( itemShowLeechersInSwarms, QLatin1String( "ShowLeechersInSwarms" ) );
  KConfigSkeleton::ItemUInt  *itemDlSpdSamples;
  itemDlSpdSamples = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "DlSpdSamples" ), mDlSpdSamples, 192 );
  addItem( itemDlSpdSamples, QLatin1String( "DlSpdSamples" ) );
  KConfigSkeleton::ItemUInt  *itemPeersSpdSamples;
  itemPeersSpdSamples = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "PeersSpdSamples" ), mPeersSpdSamples, 192 );
  addItem( itemPeersSpdSamples, QLatin1String( "PeersSpdSamples" ) );
  KConfigSkeleton::ItemUInt  *itemUlSpdSamples;
  itemUlSpdSamples = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "UlSpdSamples" ), mUlSpdSamples, 192 );
  addItem( itemUlSpdSamples, QLatin1String( "UlSpdSamples" ) );
  KConfigSkeleton::ItemUInt  *itemConnsSamples;
  itemConnsSamples = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "ConnsSamples" ), mConnsSamples, 384 );
  addItem( itemConnsSamples, QLatin1String( "ConnsSamples" ) );
  KConfigSkeleton::ItemUInt  *itemDhtSpdSamples;
  itemDhtSpdSamples = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "DhtSpdSamples" ), mDhtSpdSamples, 384 );
  addItem( itemDhtSpdSamples, QLatin1String( "DhtSpdSamples" ) );
  KConfigSkeleton::ItemColor  *itemDlSpdColor;
  itemDlSpdColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "DlSpdColor" ), mDlSpdColor, QColor( "#f00" ) );
  addItem( itemDlSpdColor, QLatin1String( "DlSpdColor" ) );
  KConfigSkeleton::ItemColor  *itemDlAvgColor;
  itemDlAvgColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "DlAvgColor" ), mDlAvgColor, QColor( "#00f" ) );
  addItem( itemDlAvgColor, QLatin1String( "DlAvgColor" ) );
  KConfigSkeleton::ItemColor  *itemDlLimitColor;
  itemDlLimitColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "DlLimitColor" ), mDlLimitColor, QColor( "#000" ) );
  addItem( itemDlLimitColor, QLatin1String( "DlLimitColor" ) );
  KConfigSkeleton::ItemColor  *itemPrAvgFromLColor;
  itemPrAvgFromLColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "PrAvgFromLColor" ), mPrAvgFromLColor, QColor( "#f00" ) );
  addItem( itemPrAvgFromLColor, QLatin1String( "PrAvgFromLColor" ) );
  KConfigSkeleton::ItemColor  *itemPrAvgToLColor;
  itemPrAvgToLColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "PrAvgToLColor" ), mPrAvgToLColor, QColor( "#0f0" ) );
  addItem( itemPrAvgToLColor, QLatin1String( "PrAvgToLColor" ) );
  KConfigSkeleton::ItemColor  *itemPrAvgFromSColor;
  itemPrAvgFromSColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "PrAvgFromSColor" ), mPrAvgFromSColor, QColor( "#00f" ) );
  addItem( itemPrAvgFromSColor, QLatin1String( "PrAvgFromSColor" ) );
  KConfigSkeleton::ItemColor  *itemPrFromLColor;
  itemPrFromLColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "PrFromLColor" ), mPrFromLColor, QColor( "#f0f" ) );
  addItem( itemPrFromLColor, QLatin1String( "PrFromLColor" ) );
  KConfigSkeleton::ItemColor  *itemPrFromSColor;
  itemPrFromSColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "PrFromSColor" ), mPrFromSColor, QColor( "#FFA200" ) );
  addItem( itemPrFromSColor, QLatin1String( "PrFromSColor" ) );
  KConfigSkeleton::ItemColor  *itemUlSpdColor;
  itemUlSpdColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "UlSpdColor" ), mUlSpdColor, QColor( "#f00" ) );
  addItem( itemUlSpdColor, QLatin1String( "UlSpdColor" ) );
  KConfigSkeleton::ItemColor  *itemUlAvgColor;
  itemUlAvgColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "UlAvgColor" ), mUlAvgColor, QColor( "#00f" ) );
  addItem( itemUlAvgColor, QLatin1String( "UlAvgColor" ) );
  KConfigSkeleton::ItemColor  *itemUlLimitColor;
  itemUlLimitColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "UlLimitColor" ), mUlLimitColor, QColor( "#000" ) );
  addItem( itemUlLimitColor, QLatin1String( "UlLimitColor" ) );
  KConfigSkeleton::ItemColor  *itemCnLConnColor;
  itemCnLConnColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "CnLConnColor" ), mCnLConnColor, QColor( "#f00" ) );
  addItem( itemCnLConnColor, QLatin1String( "CnLConnColor" ) );
  KConfigSkeleton::ItemColor  *itemCnLSwarmsColor;
  itemCnLSwarmsColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "CnLSwarmsColor" ), mCnLSwarmsColor, QColor( "#700" ) );
  addItem( itemCnLSwarmsColor, QLatin1String( "CnLSwarmsColor" ) );
  KConfigSkeleton::ItemColor  *itemCnSConnColor;
  itemCnSConnColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "CnSConnColor" ), mCnSConnColor, QColor( "#0f0" ) );
  addItem( itemCnSConnColor, QLatin1String( "CnSConnColor" ) );
  KConfigSkeleton::ItemColor  *itemCnSSwarmsColor;
  itemCnSSwarmsColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "CnSSwarmsColor" ), mCnSSwarmsColor, QColor( "#070" ) );
  addItem( itemCnSSwarmsColor, QLatin1String( "CnSSwarmsColor" ) );
  KConfigSkeleton::ItemColor  *itemCnAvgLConnPerTorrColor;
  itemCnAvgLConnPerTorrColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "CnAvgLConnPerTorrColor" ), mCnAvgLConnPerTorrColor, QColor( "#00f" ) );
  addItem( itemCnAvgLConnPerTorrColor, QLatin1String( "CnAvgLConnPerTorrColor" ) );
  KConfigSkeleton::ItemColor  *itemCnAvgSConnPerTorrColor;
  itemCnAvgSConnPerTorrColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "CnAvgSConnPerTorrColor" ), mCnAvgSConnPerTorrColor, QColor( "#007" ) );
  addItem( itemCnAvgSConnPerTorrColor, QLatin1String( "CnAvgSConnPerTorrColor" ) );
  KConfigSkeleton::ItemColor  *itemCnAvgLConnPerRunTorrColor;
  itemCnAvgLConnPerRunTorrColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "CnAvgLConnPerRunTorrColor" ), mCnAvgLConnPerRunTorrColor, QColor( "#f0f" ) );
  addItem( itemCnAvgLConnPerRunTorrColor, QLatin1String( "CnAvgLConnPerRunTorrColor" ) );
  KConfigSkeleton::ItemColor  *itemCnAvgSConnPerRunTorrColor;
  itemCnAvgSConnPerRunTorrColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "CnAvgSConnPerRunTorrColor" ), mCnAvgSConnPerRunTorrColor, QColor( "#707" ) );
  addItem( itemCnAvgSConnPerRunTorrColor, QLatin1String( "CnAvgSConnPerRunTorrColor" ) );
  KConfigSkeleton::ItemColor  *itemDhtNodesColor;
  itemDhtNodesColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "DhtNodesColor" ), mDhtNodesColor, QColor( "#f00" ) );
  addItem( itemDhtNodesColor, QLatin1String( "DhtNodesColor" ) );
  KConfigSkeleton::ItemColor  *itemDhtTasksColor;
  itemDhtTasksColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "DhtTasksColor" ), mDhtTasksColor, QColor( "#00f" ) );
  addItem( itemDhtTasksColor, QLatin1String( "DhtTasksColor" ) );
  KConfigSkeleton::ItemBool  *itemAntiAliasing;
  itemAntiAliasing = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "AntiAliasing" ), mAntiAliasing, true );
  addItem( itemAntiAliasing, QLatin1String( "AntiAliasing" ) );
  KConfigSkeleton::ItemBool  *itemDrawBgdGrid;
  itemDrawBgdGrid = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "DrawBgdGrid" ), mDrawBgdGrid, false );
  addItem( itemDrawBgdGrid, QLatin1String( "DrawBgdGrid" ) );
  KConfigSkeleton::ItemUInt  *itemWidgetType;
  itemWidgetType = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "WidgetType" ), mWidgetType, 0 );
  addItem( itemWidgetType, QLatin1String( "WidgetType" ) );
}

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

