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

#include "workspace_options.h"

#include <klocalizedstring.h>

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

  setCurrentGroup( QStringLiteral( "PlasmaToolTips" ) );

  mDelayItem = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "Delay" ), mDelay, 0.7 );
  mDelayItem->setLabel( i18nd("kcm_workspace", "Display large panel and widget tooltips") );
  mDelayItem->setToolTip( i18nd("kcm_workspace", "Allow Plasma widgets to display large panel and widget tooltips on hover") );
  addItem( mDelayItem, QStringLiteral( "delay" ) );

  setCurrentGroup( QStringLiteral( "OSD" ) );

  mOsdEnabledItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Enabled" ), mOsdEnabled, true );
  mOsdEnabledItem->setLabel( i18nd("kcm_workspace", "Display small popups for status changes") );
  mOsdEnabledItem->setToolTip( i18nd("kcm_workspace", "Allow Plasma widgets to display small popups for status changes such as brightness or volume") );
  addItem( mOsdEnabledItem, QStringLiteral( "osdEnabled" ) );
  KConfigSkeleton::ItemBool  *innerItemOsdKbdLayoutChangedEnabled;
  innerItemOsdKbdLayoutChangedEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "kbdLayoutChangedEnabled" ), mOsdKbdLayoutChangedEnabled, true );
  mOsdKbdLayoutChangedEnabledItem = new KConfigCompilerSignallingItem(innerItemOsdKbdLayoutChangedEnabled, this, notifyFunction, signalOsdKbdLayoutChangedEnabledChanged);
  mOsdKbdLayoutChangedEnabledItem->setLabel( i18nd("kcm_workspace", "OSD on layout change") );
  mOsdKbdLayoutChangedEnabledItem->setToolTip( i18nd("kcm_workspace", "Show a popup on layout changes") );
  addItem( mOsdKbdLayoutChangedEnabledItem, QStringLiteral( "osdKbdLayoutChangedEnabled" ) );
}

bool WorkspaceOptions::defaultOsdKbdLayoutChangedEnabledValue_helper() const
{

  return true;
}

WorkspaceOptions::~WorkspaceOptions()
{
}


void WorkspaceOptions::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalOsdKbdLayoutChangedEnabledChanged:
    Q_EMIT osdKbdLayoutChangedEnabledChanged();
    break;
  }
}
