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

#include "nightcolorsettings.h"

NightColorSettings::NightColorSettings( QObject *parent )
  : KConfigSkeleton( QStringLiteral( "kwinrc" ) )
{
  setParent(parent);
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&NightColorSettings::itemChanged);

  setCurrentGroup( QStringLiteral( "NightColor" ) );

  KConfigCompilerSignallingItem  *itemActiveEnabled;
  KConfigSkeleton::ItemBool  *innerItemActiveEnabled;
  innerItemActiveEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ActiveEnabled" ), mActiveEnabled, true );
  itemActiveEnabled = new KConfigCompilerSignallingItem(innerItemActiveEnabled, this, notifyFunction, signalActiveEnabledChanged);
  itemActiveEnabled->setWriteFlags(KConfigBase::Notify);
  addItem( itemActiveEnabled, QStringLiteral( "ActiveEnabled" ) );
  KConfigCompilerSignallingItem  *itemActive;
  KConfigSkeleton::ItemBool  *innerItemActive;
  innerItemActive = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Active" ), mActive, false );
  itemActive = new KConfigCompilerSignallingItem(innerItemActive, this, notifyFunction, signalActiveChanged);
  itemActive->setWriteFlags(KConfigBase::Notify);
  addItem( itemActive, QStringLiteral( "Active" ) );
  KConfigCompilerSignallingItem  *itemModeEnabled;
  KConfigSkeleton::ItemBool  *innerItemModeEnabled;
  innerItemModeEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ModeEnabled" ), mModeEnabled, true );
  itemModeEnabled = new KConfigCompilerSignallingItem(innerItemModeEnabled, this, notifyFunction, signalModeEnabledChanged);
  itemModeEnabled->setWriteFlags(KConfigBase::Notify);
  addItem( itemModeEnabled, QStringLiteral( "ModeEnabled" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesMode;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Automatic");
    valuesMode.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Location");
    valuesMode.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Times");
    valuesMode.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Constant");
    valuesMode.append( choice );
  }
  KConfigCompilerSignallingItem  *itemMode;
  KConfigSkeleton::ItemEnum  *innerItemMode;
  innerItemMode = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "Mode" ), mMode, valuesMode, ColorCorrect::Automatic );
  itemMode = new KConfigCompilerSignallingItem(innerItemMode, this, notifyFunction, signalModeChanged);
  itemMode->setWriteFlags(KConfigBase::Notify);
  addItem( itemMode, QStringLiteral( "Mode" ) );
  KConfigCompilerSignallingItem  *itemNightTemperatureEnabled;
  KConfigSkeleton::ItemBool  *innerItemNightTemperatureEnabled;
  innerItemNightTemperatureEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "NightTemperatureEnabled" ), mNightTemperatureEnabled, true );
  itemNightTemperatureEnabled = new KConfigCompilerSignallingItem(innerItemNightTemperatureEnabled, this, notifyFunction, signalNightTemperatureEnabledChanged);
  itemNightTemperatureEnabled->setWriteFlags(KConfigBase::Notify);
  addItem( itemNightTemperatureEnabled, QStringLiteral( "NightTemperatureEnabled" ) );
  KConfigCompilerSignallingItem  *itemNightTemperature;
  KConfigSkeleton::ItemInt  *innerItemNightTemperature;
  innerItemNightTemperature = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "NightTemperature" ), mNightTemperature, 4500 );
  itemNightTemperature = new KConfigCompilerSignallingItem(innerItemNightTemperature, this, notifyFunction, signalNightTemperatureChanged);
  innerItemNightTemperature->setMinValue(1000);
  innerItemNightTemperature->setMaxValue(6500);
  itemNightTemperature->setWriteFlags(KConfigBase::Notify);
  addItem( itemNightTemperature, QStringLiteral( "NightTemperature" ) );
  KConfigCompilerSignallingItem  *itemLatitudeAuto;
  KConfigSkeleton::ItemDouble  *innerItemLatitudeAuto;
  innerItemLatitudeAuto = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "LatitudeAuto" ), mLatitudeAuto, 0. );
  itemLatitudeAuto = new KConfigCompilerSignallingItem(innerItemLatitudeAuto, this, notifyFunction, signalLatitudeAutoChanged);
  itemLatitudeAuto->setWriteFlags(KConfigBase::Notify);
  addItem( itemLatitudeAuto, QStringLiteral( "LatitudeAuto" ) );
  KConfigCompilerSignallingItem  *itemLongitudeAuto;
  KConfigSkeleton::ItemDouble  *innerItemLongitudeAuto;
  innerItemLongitudeAuto = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "LongitudeAuto" ), mLongitudeAuto, 0. );
  itemLongitudeAuto = new KConfigCompilerSignallingItem(innerItemLongitudeAuto, this, notifyFunction, signalLongitudeAutoChanged);
  itemLongitudeAuto->setWriteFlags(KConfigBase::Notify);
  addItem( itemLongitudeAuto, QStringLiteral( "LongitudeAuto" ) );
  KConfigCompilerSignallingItem  *itemLocationEnabled;
  KConfigSkeleton::ItemBool  *innerItemLocationEnabled;
  innerItemLocationEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "LocationEnabled" ), mLocationEnabled, true );
  itemLocationEnabled = new KConfigCompilerSignallingItem(innerItemLocationEnabled, this, notifyFunction, signalLocationEnabledChanged);
  itemLocationEnabled->setWriteFlags(KConfigBase::Notify);
  addItem( itemLocationEnabled, QStringLiteral( "LocationEnabled" ) );
  KConfigCompilerSignallingItem  *itemLatitudeFixed;
  KConfigSkeleton::ItemDouble  *innerItemLatitudeFixed;
  innerItemLatitudeFixed = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "LatitudeFixed" ), mLatitudeFixed, 0. );
  itemLatitudeFixed = new KConfigCompilerSignallingItem(innerItemLatitudeFixed, this, notifyFunction, signalLatitudeFixedChanged);
  itemLatitudeFixed->setWriteFlags(KConfigBase::Notify);
  addItem( itemLatitudeFixed, QStringLiteral( "LatitudeFixed" ) );
  KConfigCompilerSignallingItem  *itemLongitudeFixed;
  KConfigSkeleton::ItemDouble  *innerItemLongitudeFixed;
  innerItemLongitudeFixed = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "LongitudeFixed" ), mLongitudeFixed, 0. );
  itemLongitudeFixed = new KConfigCompilerSignallingItem(innerItemLongitudeFixed, this, notifyFunction, signalLongitudeFixedChanged);
  itemLongitudeFixed->setWriteFlags(KConfigBase::Notify);
  addItem( itemLongitudeFixed, QStringLiteral( "LongitudeFixed" ) );
  KConfigCompilerSignallingItem  *itemMorningBeginFixed;
  KConfigSkeleton::ItemString  *innerItemMorningBeginFixed;
  innerItemMorningBeginFixed = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "MorningBeginFixed" ), mMorningBeginFixed, QStringLiteral( "0600" ) );
  itemMorningBeginFixed = new KConfigCompilerSignallingItem(innerItemMorningBeginFixed, this, notifyFunction, signalMorningBeginFixedChanged);
  itemMorningBeginFixed->setWriteFlags(KConfigBase::Notify);
  addItem( itemMorningBeginFixed, QStringLiteral( "MorningBeginFixed" ) );
  KConfigCompilerSignallingItem  *itemEveningBeginFixed;
  KConfigSkeleton::ItemString  *innerItemEveningBeginFixed;
  innerItemEveningBeginFixed = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "EveningBeginFixed" ), mEveningBeginFixed, QStringLiteral( "1800" ) );
  itemEveningBeginFixed = new KConfigCompilerSignallingItem(innerItemEveningBeginFixed, this, notifyFunction, signalEveningBeginFixedChanged);
  itemEveningBeginFixed->setWriteFlags(KConfigBase::Notify);
  addItem( itemEveningBeginFixed, QStringLiteral( "EveningBeginFixed" ) );
  KConfigCompilerSignallingItem  *itemTransitionTime;
  KConfigSkeleton::ItemInt  *innerItemTransitionTime;
  innerItemTransitionTime = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "TransitionTime" ), mTransitionTime, 30 );
  itemTransitionTime = new KConfigCompilerSignallingItem(innerItemTransitionTime, this, notifyFunction, signalTransitionTimeChanged);
  itemTransitionTime->setWriteFlags(KConfigBase::Notify);
  addItem( itemTransitionTime, QStringLiteral( "TransitionTime" ) );
}

bool NightColorSettings::defaultActiveEnabledValue_helper() const
{

  return true;
}

bool NightColorSettings::defaultActiveValue_helper() const
{

  return false;
}

bool NightColorSettings::defaultModeEnabledValue_helper() const
{

  return true;
}

int NightColorSettings::defaultModeValue_helper() const
{

  return ColorCorrect::Automatic;
}

bool NightColorSettings::defaultNightTemperatureEnabledValue_helper() const
{

  return true;
}

int NightColorSettings::defaultNightTemperatureValue_helper() const
{

  return 4500;
}

double NightColorSettings::defaultLatitudeAutoValue_helper() const
{

  return 0.;
}

double NightColorSettings::defaultLongitudeAutoValue_helper() const
{

  return 0.;
}

bool NightColorSettings::defaultLocationEnabledValue_helper() const
{

  return true;
}

double NightColorSettings::defaultLatitudeFixedValue_helper() const
{

  return 0.;
}

double NightColorSettings::defaultLongitudeFixedValue_helper() const
{

  return 0.;
}

QString NightColorSettings::defaultMorningBeginFixedValue_helper() const
{

  return QStringLiteral( "0600" );
}

QString NightColorSettings::defaultEveningBeginFixedValue_helper() const
{

  return QStringLiteral( "1800" );
}

int NightColorSettings::defaultTransitionTimeValue_helper() const
{

  return 30;
}

NightColorSettings::~NightColorSettings()
{
}


void NightColorSettings::itemChanged(quint64 flags) {

  if ( flags & signalActiveEnabledChanged ) {
    Q_EMIT ActiveEnabledChanged();
  }
  if ( flags & signalActiveChanged ) {
    Q_EMIT ActiveChanged();
  }
  if ( flags & signalModeEnabledChanged ) {
    Q_EMIT ModeEnabledChanged();
  }
  if ( flags & signalModeChanged ) {
    Q_EMIT ModeChanged();
  }
  if ( flags & signalNightTemperatureEnabledChanged ) {
    Q_EMIT NightTemperatureEnabledChanged();
  }
  if ( flags & signalNightTemperatureChanged ) {
    Q_EMIT NightTemperatureChanged();
  }
  if ( flags & signalLatitudeAutoChanged ) {
    Q_EMIT LatitudeAutoChanged();
  }
  if ( flags & signalLongitudeAutoChanged ) {
    Q_EMIT LongitudeAutoChanged();
  }
  if ( flags & signalLocationEnabledChanged ) {
    Q_EMIT LocationEnabledChanged();
  }
  if ( flags & signalLatitudeFixedChanged ) {
    Q_EMIT LatitudeFixedChanged();
  }
  if ( flags & signalLongitudeFixedChanged ) {
    Q_EMIT LongitudeFixedChanged();
  }
  if ( flags & signalMorningBeginFixedChanged ) {
    Q_EMIT MorningBeginFixedChanged();
  }
  if ( flags & signalEveningBeginFixedChanged ) {
    Q_EMIT EveningBeginFixedChanged();
  }
  if ( flags & signalTransitionTimeChanged ) {
    Q_EMIT TransitionTimeChanged();
  }
}

#include "nightcolorsettings.moc"

