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

#include "virtualdesktopssettings.h"

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

  setCurrentGroup( QStringLiteral( "Windows" ) );

  KConfigCompilerSignallingItem  *itemRollOverDesktops;
  KConfigSkeleton::ItemBool  *innerItemRollOverDesktops;
  innerItemRollOverDesktops = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "RollOverDesktops" ), mRollOverDesktops, false );
  itemRollOverDesktops = new KConfigCompilerSignallingItem(innerItemRollOverDesktops, this, notifyFunction, signalRollOverDesktopsChanged);
  addItem( itemRollOverDesktops, QStringLiteral( "rollOverDesktops" ) );
  KConfigCompilerSignallingItem  *itemPerOutputVirtualDesktops;
  KConfigSkeleton::ItemBool  *innerItemPerOutputVirtualDesktops;
  innerItemPerOutputVirtualDesktops = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PerOutputVirtualDesktops" ), mPerOutputVirtualDesktops, false );
  itemPerOutputVirtualDesktops = new KConfigCompilerSignallingItem(innerItemPerOutputVirtualDesktops, this, notifyFunction, signalPerOutputVirtualDesktopsChanged);
  addItem( itemPerOutputVirtualDesktops, QStringLiteral( "perOutputVirtualDesktops" ) );

  setCurrentGroup( QStringLiteral( "Plugins" ) );

  KConfigCompilerSignallingItem  *itemDesktopChangeOsdEnabled;
  KConfigSkeleton::ItemBool  *innerItemDesktopChangeOsdEnabled;
  innerItemDesktopChangeOsdEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "desktopchangeosdEnabled" ), mDesktopChangeOsdEnabled, false );
  itemDesktopChangeOsdEnabled = new KConfigCompilerSignallingItem(innerItemDesktopChangeOsdEnabled, this, notifyFunction, signalDesktopChangeOsdEnabledChanged);
  addItem( itemDesktopChangeOsdEnabled, QStringLiteral( "desktopChangeOsdEnabled" ) );

  setCurrentGroup( QStringLiteral( "Script-desktopchangeosd" ) );

  KConfigCompilerSignallingItem  *itemPopupHideDelay;
  KConfigSkeleton::ItemInt  *innerItemPopupHideDelay;
  innerItemPopupHideDelay = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "PopupHideDelay" ), mPopupHideDelay, 1000 );
  itemPopupHideDelay = new KConfigCompilerSignallingItem(innerItemPopupHideDelay, this, notifyFunction, signalPopupHideDelayChanged);
  addItem( itemPopupHideDelay, QStringLiteral( "popupHideDelay" ) );
  KConfigCompilerSignallingItem  *itemTextOnly;
  KConfigSkeleton::ItemBool  *innerItemTextOnly;
  innerItemTextOnly = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "TextOnly" ), mTextOnly, false );
  itemTextOnly = new KConfigCompilerSignallingItem(innerItemTextOnly, this, notifyFunction, signalTextOnlyChanged);
  addItem( itemTextOnly, QStringLiteral( "textOnly" ) );
}

bool VirtualDesktopsSettings::defaultRollOverDesktopsValue_helper() const
{

  return false;
}

bool VirtualDesktopsSettings::defaultPerOutputVirtualDesktopsValue_helper() const
{

  return false;
}

bool VirtualDesktopsSettings::defaultDesktopChangeOsdEnabledValue_helper() const
{

  return false;
}

int VirtualDesktopsSettings::defaultPopupHideDelayValue_helper() const
{

  return 1000;
}

bool VirtualDesktopsSettings::defaultTextOnlyValue_helper() const
{

  return false;
}

VirtualDesktopsSettings::~VirtualDesktopsSettings()
{
}


void VirtualDesktopsSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalRollOverDesktopsChanged:
    Q_EMIT rollOverDesktopsChanged();
    break;
  case signalPerOutputVirtualDesktopsChanged:
    Q_EMIT perOutputVirtualDesktopsChanged();
    break;
  case signalDesktopChangeOsdEnabledChanged:
    Q_EMIT desktopChangeOsdEnabledChanged();
    break;
  case signalPopupHideDelayChanged:
    Q_EMIT popupHideDelayChanged();
    break;
  case signalTextOnlyChanged:
    Q_EMIT textOnlyChanged();
    break;
  }
}
