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

#include "bwschedulerpluginsettings.h"

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

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

  return s_globalSchedulerPluginSettings()->q;
}

SchedulerPluginSettings::SchedulerPluginSettings( )
  : KConfigSkeleton( QStringLiteral( "ktorrent_bwschedulerrc" ) )
{
  Q_ASSERT(!s_globalSchedulerPluginSettings()->q);
  s_globalSchedulerPluginSettings()->q = this;
  setCurrentGroup( QStringLiteral( "general" ) );

  KConfigSkeleton::ItemColor  *itemItemColor;
  itemItemColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "itemColor" ), mItemColor, QColor(0,255,0,255) );
  addItem( itemItemColor, QStringLiteral( "itemColor" ) );
  KConfigSkeleton::ItemColor  *itemSuspendedColor;
  itemSuspendedColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "suspendedColor" ), mSuspendedColor, QColor(255,0,0,255) );
  addItem( itemSuspendedColor, QStringLiteral( "suspendedColor" ) );
  KConfigSkeleton::ItemColor  *itemScheduleBackgroundColor;
  itemScheduleBackgroundColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "scheduleBackgroundColor" ), mScheduleBackgroundColor, QColor(Qt::yellow) );
  addItem( itemScheduleBackgroundColor, QStringLiteral( "scheduleBackgroundColor" ) );
  KConfigSkeleton::ItemColor  *itemScheduleLineColor;
  itemScheduleLineColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "scheduleLineColor" ), mScheduleLineColor, QColor(Qt::blue) );
  addItem( itemScheduleLineColor, QStringLiteral( "scheduleLineColor" ) );
  KConfigSkeleton::ItemBool  *itemScreensaverLimits;
  itemScreensaverLimits = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "screensaverLimits" ), mScreensaverLimits, false );
  addItem( itemScreensaverLimits, QStringLiteral( "screensaverLimits" ) );
  KConfigSkeleton::ItemInt  *itemScreensaverUploadLimit;
  itemScreensaverUploadLimit = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "screensaverUploadLimit" ), mScreensaverUploadLimit, 0 );
  itemScreensaverUploadLimit->setMinValue(0);
  addItem( itemScreensaverUploadLimit, QStringLiteral( "screensaverUploadLimit" ) );
  KConfigSkeleton::ItemInt  *itemScreensaverDownloadLimit;
  itemScreensaverDownloadLimit = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "screensaverDownloadLimit" ), mScreensaverDownloadLimit, 0 );
  itemScreensaverDownloadLimit->setMinValue(0);
  addItem( itemScreensaverDownloadLimit, QStringLiteral( "screensaverDownloadLimit" ) );
}

SchedulerPluginSettings::~SchedulerPluginSettings()
{
  s_globalSchedulerPluginSettings()->q = nullptr;
}

