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

#include "workspaceoptions_plasmasettings.h"

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

  setCurrentGroup( QStringLiteral( "PlasmaToolTips" ) );

  KConfigCompilerSignallingItem  *itemDelay;
  KConfigSkeleton::ItemDouble  *innerItemDelay;
  innerItemDelay = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "Delay" ), mDelay, 0.7 );
  itemDelay = new KConfigCompilerSignallingItem(innerItemDelay, this, notifyFunction, signalDelayChanged);
  itemDelay->setWriteFlags(KConfigBase::Notify);
  addItem( itemDelay, QStringLiteral( "delay" ) );

  setCurrentGroup( QStringLiteral( "OSD" ) );

  KConfigCompilerSignallingItem  *itemOsdEnabled;
  KConfigSkeleton::ItemBool  *innerItemOsdEnabled;
  innerItemOsdEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Enabled" ), mOsdEnabled, true );
  itemOsdEnabled = new KConfigCompilerSignallingItem(innerItemOsdEnabled, this, notifyFunction, signalOsdEnabledChanged);
  itemOsdEnabled->setWriteFlags(KConfigBase::Notify);
  addItem( itemOsdEnabled, QStringLiteral( "osdEnabled" ) );
  KConfigCompilerSignallingItem  *itemOsdKbdLayoutChangedEnabled;
  KConfigSkeleton::ItemBool  *innerItemOsdKbdLayoutChangedEnabled;
  innerItemOsdKbdLayoutChangedEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "kbdLayoutChangedEnabled" ), mOsdKbdLayoutChangedEnabled, true );
  itemOsdKbdLayoutChangedEnabled = new KConfigCompilerSignallingItem(innerItemOsdKbdLayoutChangedEnabled, this, notifyFunction, signalOsdKbdLayoutChangedEnabledChanged);
  itemOsdKbdLayoutChangedEnabled->setWriteFlags(KConfigBase::Notify);
  addItem( itemOsdKbdLayoutChangedEnabled, QStringLiteral( "osdKbdLayoutChangedEnabled" ) );
}

double WorkspaceOptionsPlasmaSettings::defaultDelayValue_helper() const
{

  return 0.7;
}

bool WorkspaceOptionsPlasmaSettings::defaultOsdEnabledValue_helper() const
{

  return true;
}

bool WorkspaceOptionsPlasmaSettings::defaultOsdKbdLayoutChangedEnabledValue_helper() const
{

  return true;
}

WorkspaceOptionsPlasmaSettings::~WorkspaceOptionsPlasmaSettings()
{
}


void WorkspaceOptionsPlasmaSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalDelayChanged:
    Q_EMIT delayChanged();
    break;
  case signalOsdEnabledChanged:
    Q_EMIT osdEnabledChanged();
    break;
  case signalOsdKbdLayoutChangedEnabledChanged:
    Q_EMIT osdKbdLayoutChangedEnabledChanged();
    break;
  }
}
