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

#include "kdarklightstate.h"

KDarkLightState::KDarkLightState( )
  : KConfigSkeleton( KSharedConfig::openStateConfig(QStringLiteral( "knighttimestaterc") ) )
{
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&KDarkLightState::itemChanged);

  setCurrentGroup( QStringLiteral( "AutomaticLocation" ) );

  KConfigCompilerSignallingItem  *itemAvailable;
  KConfigSkeleton::ItemBool  *innerItemAvailable;
  innerItemAvailable = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Available" ), mAvailable, false );
  itemAvailable = new KConfigCompilerSignallingItem(innerItemAvailable, this, notifyFunction, signalAvailableChanged);
  addItem( itemAvailable, QStringLiteral( "Available" ) );
  KConfigCompilerSignallingItem  *itemLatitude;
  KConfigSkeleton::ItemDouble  *innerItemLatitude;
  innerItemLatitude = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "Latitude" ), mLatitude, 0 );
  itemLatitude = new KConfigCompilerSignallingItem(innerItemLatitude, this, notifyFunction, signalLatitudeChanged);
  addItem( itemLatitude, QStringLiteral( "Latitude" ) );
  KConfigCompilerSignallingItem  *itemLongitude;
  KConfigSkeleton::ItemDouble  *innerItemLongitude;
  innerItemLongitude = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "Longitude" ), mLongitude, 0 );
  itemLongitude = new KConfigCompilerSignallingItem(innerItemLongitude, this, notifyFunction, signalLongitudeChanged);
  addItem( itemLongitude, QStringLiteral( "Longitude" ) );
}

KDarkLightState::~KDarkLightState()
{
}


void KDarkLightState::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalAvailableChanged:
    Q_EMIT AvailableChanged();
    break;
  case signalLatitudeChanged:
    Q_EMIT LatitudeChanged();
    break;
  case signalLongitudeChanged:
    Q_EMIT LongitudeChanged();
    break;
  }
}
