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

#include "sddmsettings.h"

SddmSettings::SddmSettings( KSharedConfig::Ptr config, QObject *parent )
  : SddmSettingsBase( std::move( config ) )
{
  setParent(parent);
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&SddmSettings::itemChanged);

  setCurrentGroup( QStringLiteral( "Theme" ) );

  KConfigCompilerSignallingItem  *itemCurrent;
  SddmSettingsBase::ItemString  *innerItemCurrent;
  innerItemCurrent = new SddmSettingsBase::ItemString( currentGroup(), QStringLiteral( "Current" ), mCurrent, defaultCurrent() );
  itemCurrent = new KConfigCompilerSignallingItem(innerItemCurrent, this, notifyFunction, signalCurrentChanged);
  addItem( itemCurrent, QStringLiteral( "Current" ) );

  setCurrentGroup( QStringLiteral( "Users" ) );

  KConfigCompilerSignallingItem  *itemMinimumUid;
  SddmSettingsBase::ItemUInt  *innerItemMinimumUid;
  innerItemMinimumUid = new SddmSettingsBase::ItemUInt( currentGroup(), QStringLiteral( "MinimumUid" ), mMinimumUid, defaultMinimumUid() );
  itemMinimumUid = new KConfigCompilerSignallingItem(innerItemMinimumUid, this, notifyFunction, signalMinimumUidChanged);
  addItem( itemMinimumUid, QStringLiteral( "MinimumUid" ) );
  KConfigCompilerSignallingItem  *itemMaximumUid;
  SddmSettingsBase::ItemUInt  *innerItemMaximumUid;
  innerItemMaximumUid = new SddmSettingsBase::ItemUInt( currentGroup(), QStringLiteral( "MaximumUid" ), mMaximumUid, defaultMaximumUid() );
  itemMaximumUid = new KConfigCompilerSignallingItem(innerItemMaximumUid, this, notifyFunction, signalMaximumUidChanged);
  addItem( itemMaximumUid, QStringLiteral( "MaximumUid" ) );

  setCurrentGroup( QStringLiteral( "Autologin" ) );

  KConfigCompilerSignallingItem  *itemUser;
  SddmSettingsBase::ItemString  *innerItemUser;
  innerItemUser = new SddmSettingsBase::ItemString( currentGroup(), QStringLiteral( "User" ), mUser, defaultUser() );
  itemUser = new KConfigCompilerSignallingItem(innerItemUser, this, notifyFunction, signalUserChanged);
  addItem( itemUser, QStringLiteral( "User" ) );
  KConfigCompilerSignallingItem  *itemSession;
  SddmSettingsBase::ItemString  *innerItemSession;
  innerItemSession = new SddmSettingsBase::ItemString( currentGroup(), QStringLiteral( "Session" ), mSession, defaultSession() );
  itemSession = new KConfigCompilerSignallingItem(innerItemSession, this, notifyFunction, signalSessionChanged);
  addItem( itemSession, QStringLiteral( "Session" ) );
  KConfigCompilerSignallingItem  *itemRelogin;
  SddmSettingsBase::ItemBool  *innerItemRelogin;
  innerItemRelogin = new SddmSettingsBase::ItemBool( currentGroup(), QStringLiteral( "Relogin" ), mRelogin, defaultRelogin() );
  itemRelogin = new KConfigCompilerSignallingItem(innerItemRelogin, this, notifyFunction, signalReloginChanged);
  addItem( itemRelogin, QStringLiteral( "Relogin" ) );

  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigCompilerSignallingItem  *itemHaltCommand;
  SddmSettingsBase::ItemString  *innerItemHaltCommand;
  innerItemHaltCommand = new SddmSettingsBase::ItemString( currentGroup(), QStringLiteral( "HaltCommand" ), mHaltCommand, defaultHaltCommand() );
  itemHaltCommand = new KConfigCompilerSignallingItem(innerItemHaltCommand, this, notifyFunction, signalHaltCommandChanged);
  addItem( itemHaltCommand, QStringLiteral( "HaltCommand" ) );
  KConfigCompilerSignallingItem  *itemRebootCommand;
  SddmSettingsBase::ItemString  *innerItemRebootCommand;
  innerItemRebootCommand = new SddmSettingsBase::ItemString( currentGroup(), QStringLiteral( "RebootCommand" ), mRebootCommand, defaultRebootCommand() );
  itemRebootCommand = new KConfigCompilerSignallingItem(innerItemRebootCommand, this, notifyFunction, signalRebootCommandChanged);
  addItem( itemRebootCommand, QStringLiteral( "RebootCommand" ) );
}

QString SddmSettings::defaultCurrentValue_helper() const
{

  return defaultCurrent();
}

uint SddmSettings::defaultMinimumUidValue_helper() const
{

  return defaultMinimumUid();
}

uint SddmSettings::defaultMaximumUidValue_helper() const
{

  return defaultMaximumUid();
}

QString SddmSettings::defaultUserValue_helper() const
{

  return defaultUser();
}

QString SddmSettings::defaultSessionValue_helper() const
{

  return defaultSession();
}

bool SddmSettings::defaultReloginValue_helper() const
{

  return defaultRelogin();
}

QString SddmSettings::defaultHaltCommandValue_helper() const
{

  return defaultHaltCommand();
}

QString SddmSettings::defaultRebootCommandValue_helper() const
{

  return defaultRebootCommand();
}

SddmSettings::~SddmSettings()
{
}


void SddmSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalCurrentChanged:
    Q_EMIT CurrentChanged();
    break;
  case signalMinimumUidChanged:
    Q_EMIT MinimumUidChanged();
    break;
  case signalMaximumUidChanged:
    Q_EMIT MaximumUidChanged();
    break;
  case signalUserChanged:
    Q_EMIT UserChanged();
    break;
  case signalSessionChanged:
    Q_EMIT SessionChanged();
    break;
  case signalReloginChanged:
    Q_EMIT ReloginChanged();
    break;
  case signalHaltCommandChanged:
    Q_EMIT HaltCommandChanged();
    break;
  case signalRebootCommandChanged:
    Q_EMIT RebootCommandChanged();
    break;
  }
}
