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

#include "keyboardsettings.h"

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

  setCurrentGroup( QStringLiteral( "Layout" ) );

  KConfigCompilerSignallingItem  *itemLayoutList;
  KConfigSkeleton::ItemStringList  *innerItemLayoutList;
  innerItemLayoutList = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "LayoutList" ), mLayoutList, QStringList() );
  itemLayoutList = new KConfigCompilerSignallingItem(innerItemLayoutList, this, notifyFunction, signalLayoutListChanged);
  itemLayoutList->setWriteFlags(KConfigBase::Notify);
  addItem( itemLayoutList, QStringLiteral( "layoutList" ) );
  KConfigCompilerSignallingItem  *itemLayoutLoopCount;
  KConfigSkeleton::ItemInt  *innerItemLayoutLoopCount;
  innerItemLayoutLoopCount = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "LayoutLoopCount" ), mLayoutLoopCount, -1 );
  itemLayoutLoopCount = new KConfigCompilerSignallingItem(innerItemLayoutLoopCount, this, notifyFunction, signalLayoutLoopCountChanged);
  itemLayoutLoopCount->setWriteFlags(KConfigBase::Notify);
  addItem( itemLayoutLoopCount, QStringLiteral( "layoutLoopCount" ) );
  KConfigCompilerSignallingItem  *itemKeyboardModel;
  KConfigSkeleton::ItemString  *innerItemKeyboardModel;
  innerItemKeyboardModel = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "Model" ), mKeyboardModel, QStringLiteral( "pc104" ) );
  itemKeyboardModel = new KConfigCompilerSignallingItem(innerItemKeyboardModel, this, notifyFunction, signalKeyboardModelChanged);
  itemKeyboardModel->setWriteFlags(KConfigBase::Notify);
  addItem( itemKeyboardModel, QStringLiteral( "keyboardModel" ) );
  KConfigCompilerSignallingItem  *itemXkbOptions;
  KConfigSkeleton::ItemStringList  *innerItemXkbOptions;
  innerItemXkbOptions = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "Options" ), mXkbOptions, QStringList() );
  itemXkbOptions = new KConfigCompilerSignallingItem(innerItemXkbOptions, this, notifyFunction, signalXkbOptionsChanged);
  itemXkbOptions->setWriteFlags(KConfigBase::Notify);
  addItem( itemXkbOptions, QStringLiteral( "xkbOptions" ) );
  KConfigCompilerSignallingItem  *itemResetOldXkbOptions;
  KConfigSkeleton::ItemBool  *innerItemResetOldXkbOptions;
  innerItemResetOldXkbOptions = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ResetOldOptions" ), mResetOldXkbOptions, false );
  itemResetOldXkbOptions = new KConfigCompilerSignallingItem(innerItemResetOldXkbOptions, this, notifyFunction, signalResetOldXkbOptionsChanged);
  itemResetOldXkbOptions->setWriteFlags(KConfigBase::Notify);
  addItem( itemResetOldXkbOptions, QStringLiteral( "resetOldXkbOptions" ) );
  KConfigCompilerSignallingItem  *itemSwitchMode;
  KConfigSkeleton::ItemString  *innerItemSwitchMode;
  innerItemSwitchMode = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "SwitchMode" ), mSwitchMode, QStringLiteral( "Global" ) );
  itemSwitchMode = new KConfigCompilerSignallingItem(innerItemSwitchMode, this, notifyFunction, signalSwitchModeChanged);
  itemSwitchMode->setWriteFlags(KConfigBase::Notify);
  addItem( itemSwitchMode, QStringLiteral( "switchMode" ) );
  KConfigCompilerSignallingItem  *itemConfigureLayouts;
  KConfigSkeleton::ItemBool  *innerItemConfigureLayouts;
  innerItemConfigureLayouts = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Use" ), mConfigureLayouts, false );
  itemConfigureLayouts = new KConfigCompilerSignallingItem(innerItemConfigureLayouts, this, notifyFunction, signalConfigureLayoutsChanged);
  itemConfigureLayouts->setWriteFlags(KConfigBase::Notify);
  addItem( itemConfigureLayouts, QStringLiteral( "configureLayouts" ) );
  KConfigCompilerSignallingItem  *itemVariantList;
  KConfigSkeleton::ItemStringList  *innerItemVariantList;
  innerItemVariantList = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "VariantList" ), mVariantList, QStringList() );
  itemVariantList = new KConfigCompilerSignallingItem(innerItemVariantList, this, notifyFunction, signalVariantListChanged);
  itemVariantList->setWriteFlags(KConfigBase::Notify);
  addItem( itemVariantList, QStringLiteral( "variantList" ) );
  KConfigCompilerSignallingItem  *itemDisplayNames;
  KConfigSkeleton::ItemStringList  *innerItemDisplayNames;
  innerItemDisplayNames = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "DisplayNames" ), mDisplayNames, QStringList() );
  itemDisplayNames = new KConfigCompilerSignallingItem(innerItemDisplayNames, this, notifyFunction, signalDisplayNamesChanged);
  itemDisplayNames->setWriteFlags(KConfigBase::Notify);
  addItem( itemDisplayNames, QStringLiteral( "displayNames" ) );
}

QStringList KeyboardSettings::defaultLayoutListValue_helper() const
{

  return QStringList();
}

int KeyboardSettings::defaultLayoutLoopCountValue_helper() const
{

  return -1;
}

QString KeyboardSettings::defaultKeyboardModelValue_helper() const
{

  return QStringLiteral( "pc104" );
}

QStringList KeyboardSettings::defaultXkbOptionsValue_helper() const
{

  return QStringList();
}

bool KeyboardSettings::defaultResetOldXkbOptionsValue_helper() const
{

  return false;
}

QString KeyboardSettings::defaultSwitchModeValue_helper() const
{

  return QStringLiteral( "Global" );
}

bool KeyboardSettings::defaultConfigureLayoutsValue_helper() const
{

  return false;
}

QStringList KeyboardSettings::defaultVariantListValue_helper() const
{

  return QStringList();
}

QStringList KeyboardSettings::defaultDisplayNamesValue_helper() const
{

  return QStringList();
}

KeyboardSettings::~KeyboardSettings()
{
}


void KeyboardSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalLayoutListChanged:
    Q_EMIT layoutListChanged();
    break;
  case signalLayoutLoopCountChanged:
    Q_EMIT layoutLoopCountChanged();
    break;
  case signalKeyboardModelChanged:
    Q_EMIT keyboardModelChanged();
    break;
  case signalXkbOptionsChanged:
    Q_EMIT xkbOptionsChanged();
    break;
  case signalResetOldXkbOptionsChanged:
    Q_EMIT resetOldXkbOptionsChanged();
    break;
  case signalSwitchModeChanged:
    Q_EMIT switchModeChanged();
    break;
  case signalConfigureLayoutsChanged:
    Q_EMIT configureLayoutsChanged();
    break;
  case signalVariantListChanged:
    Q_EMIT variantListChanged();
    break;
  case signalDisplayNamesChanged:
    Q_EMIT displayNamesChanged();
    break;
  }
}
