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

#include "bwschedulerpluginsettings.h"

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

using namespace kt;

namespace kt {

class SchedulerPluginSettingsHelper
{
  public:
    SchedulerPluginSettingsHelper() : q(0) {}
    ~SchedulerPluginSettingsHelper() { delete q; }
    SchedulerPluginSettings *q;
};
}

K_GLOBAL_STATIC(SchedulerPluginSettingsHelper, s_globalSchedulerPluginSettings)
SchedulerPluginSettings *SchedulerPluginSettings::self()
{
  if (!s_globalSchedulerPluginSettings->q) {
    new SchedulerPluginSettings;
    s_globalSchedulerPluginSettings->q->readConfig();
  }

  return s_globalSchedulerPluginSettings->q;
}

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

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

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

