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

#include "statspluginsettings.h"

#include <qglobal.h>
#include <QFile>

class StatsPluginSettingsHelper
{
  public:
    StatsPluginSettingsHelper() : q(nullptr) {}
    ~StatsPluginSettingsHelper() { delete q; q = nullptr; }
    StatsPluginSettingsHelper(const StatsPluginSettingsHelper&) = delete;
    StatsPluginSettingsHelper& operator=(const StatsPluginSettingsHelper&) = delete;
    StatsPluginSettings *q;
};
Q_GLOBAL_STATIC(StatsPluginSettingsHelper, s_globalStatsPluginSettings)
StatsPluginSettings *StatsPluginSettings::self()
{
  if (!s_globalStatsPluginSettings()->q) {
    new StatsPluginSettings;
    s_globalStatsPluginSettings()->q->read();
  }

  return s_globalStatsPluginSettings()->q;
}

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

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

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

