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

#include "updatessettings.h"

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

  setCurrentGroup( QStringLiteral( "Global" ) );

  KConfigCompilerSignallingItem  *itemUseUnattendedUpdates;
  KConfigSkeleton::ItemBool  *innerItemUseUnattendedUpdates;
  innerItemUseUnattendedUpdates = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseUnattendedUpdates" ), mUseUnattendedUpdates, false );
  itemUseUnattendedUpdates = new KConfigCompilerSignallingItem(innerItemUseUnattendedUpdates, this, notifyFunction, signalUseUnattendedUpdatesChanged);
  itemUseUnattendedUpdates->setWriteFlags(KConfigBase::Notify);
  addItem( itemUseUnattendedUpdates, QStringLiteral( "UseUnattendedUpdates" ) );
  KConfigCompilerSignallingItem  *itemLastUnattendedTrigger;
  KConfigSkeleton::ItemDateTime  *innerItemLastUnattendedTrigger;
  innerItemLastUnattendedTrigger = new KConfigSkeleton::ItemDateTime( currentGroup(), QStringLiteral( "LastUnattendedTrigger" ), mLastUnattendedTrigger );
  itemLastUnattendedTrigger = new KConfigCompilerSignallingItem(innerItemLastUnattendedTrigger, this, notifyFunction, signalLastUnattendedTriggerChanged);
  itemLastUnattendedTrigger->setWriteFlags(KConfigBase::Notify);
  addItem( itemLastUnattendedTrigger, QStringLiteral( "LastUnattendedTrigger" ) );
  KConfigCompilerSignallingItem  *itemRequiredNotificationInterval;
  KConfigSkeleton::ItemInt  *innerItemRequiredNotificationInterval;
  innerItemRequiredNotificationInterval = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "RequiredNotificationInterval" ), mRequiredNotificationInterval, 60 * 60 * 24 );
  itemRequiredNotificationInterval = new KConfigCompilerSignallingItem(innerItemRequiredNotificationInterval, this, notifyFunction, signalRequiredNotificationIntervalChanged);
  itemRequiredNotificationInterval->setWriteFlags(KConfigBase::Notify);
  addItem( itemRequiredNotificationInterval, QStringLiteral( "RequiredNotificationInterval" ) );
  KConfigCompilerSignallingItem  *itemLastNotificationTime;
  KConfigSkeleton::ItemDateTime  *innerItemLastNotificationTime;
  innerItemLastNotificationTime = new KConfigSkeleton::ItemDateTime( currentGroup(), QStringLiteral( "LastNotificationTime" ), mLastNotificationTime );
  itemLastNotificationTime = new KConfigCompilerSignallingItem(innerItemLastNotificationTime, this, notifyFunction, signalLastNotificationTimeChanged);
  itemLastNotificationTime->setWriteFlags(KConfigBase::Notify);
  addItem( itemLastNotificationTime, QStringLiteral( "LastNotificationTime" ) );
}

bool UpdatesSettings::defaultUseUnattendedUpdatesValue_helper() const
{

  return false;
}

int UpdatesSettings::defaultRequiredNotificationIntervalValue_helper() const
{

  return 60 * 60 * 24;
}

UpdatesSettings::~UpdatesSettings()
{
}


void UpdatesSettings::itemChanged(quint64 flags) {

  if ( flags & signalUseUnattendedUpdatesChanged ) {
    Q_EMIT UseUnattendedUpdatesChanged();
  }
  if ( flags & signalLastUnattendedTriggerChanged ) {
    Q_EMIT LastUnattendedTriggerChanged();
  }
  if ( flags & signalRequiredNotificationIntervalChanged ) {
    Q_EMIT RequiredNotificationIntervalChanged();
  }
  if ( flags & signalLastNotificationTimeChanged ) {
    Q_EMIT LastNotificationTimeChanged();
  }
}

#include "updatessettings.moc"

