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

#include "workspaceoptions_kdeglobalssettings.h"

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

  setCurrentGroup( QStringLiteral( "KDE" ) );

  KConfigCompilerSignallingItem  *itemSingleClick;
  KConfigSkeleton::ItemBool  *innerItemSingleClick;
  innerItemSingleClick = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SingleClick" ), mSingleClick, false );
  itemSingleClick = new KConfigCompilerSignallingItem(innerItemSingleClick, this, notifyFunction, signalSingleClickChanged);
  addItem( itemSingleClick, QStringLiteral( "singleClick" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesdndBehavior;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("AlwaysAsk");
    valuesdndBehavior.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("MoveIfSameDevice");
    valuesdndBehavior.append( choice );
  }
  KConfigCompilerSignallingItem  *itemDndBehavior;
  KConfigSkeleton::ItemEnum  *innerItemDndBehavior;
  innerItemDndBehavior = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "DndBehavior" ), mDndBehavior, valuesdndBehavior, AlwaysAsk );
  itemDndBehavior = new KConfigCompilerSignallingItem(innerItemDndBehavior, this, notifyFunction, signalDndBehaviorChanged);
  addItem( itemDndBehavior, QStringLiteral( "dndBehavior" ) );
  KConfigCompilerSignallingItem  *itemSmoothScroll;
  KConfigSkeleton::ItemBool  *innerItemSmoothScroll;
  innerItemSmoothScroll = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SmoothScroll" ), mSmoothScroll, true );
  itemSmoothScroll = new KConfigCompilerSignallingItem(innerItemSmoothScroll, this, notifyFunction, signalSmoothScrollChanged);
  addItem( itemSmoothScroll, QStringLiteral( "smoothScroll" ) );
  KConfigCompilerSignallingItem  *itemScrollbarLeftClickNavigatesByPage;
  KConfigSkeleton::ItemBool  *innerItemScrollbarLeftClickNavigatesByPage;
  innerItemScrollbarLeftClickNavigatesByPage = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ScrollbarLeftClickNavigatesByPage" ), mScrollbarLeftClickNavigatesByPage, false );
  itemScrollbarLeftClickNavigatesByPage = new KConfigCompilerSignallingItem(innerItemScrollbarLeftClickNavigatesByPage, this, notifyFunction, signalScrollbarLeftClickNavigatesByPageChanged);
  itemScrollbarLeftClickNavigatesByPage->setWriteFlags(KConfigBase::Notify);
  addItem( itemScrollbarLeftClickNavigatesByPage, QStringLiteral( "scrollbarLeftClickNavigatesByPage" ) );
  KConfigCompilerSignallingItem  *itemDoubleClickInterval;
  KConfigSkeleton::ItemInt  *innerItemDoubleClickInterval;
  innerItemDoubleClickInterval = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "DoubleClickInterval" ), mDoubleClickInterval, 400 );
  itemDoubleClickInterval = new KConfigCompilerSignallingItem(innerItemDoubleClickInterval, this, notifyFunction, signalDoubleClickIntervalChanged);
  innerItemDoubleClickInterval->setMinValue(100);
  innerItemDoubleClickInterval->setMaxValue(2000);
  itemDoubleClickInterval->setWriteFlags(KConfigBase::Notify);
  addItem( itemDoubleClickInterval, QStringLiteral( "doubleClickInterval" ) );
}

bool WorkspaceOptionsGlobalsSettings::defaultSingleClickValue_helper() const
{

  return false;
}

int WorkspaceOptionsGlobalsSettings::defaultDndBehaviorValue_helper() const
{

  return AlwaysAsk;
}

bool WorkspaceOptionsGlobalsSettings::defaultSmoothScrollValue_helper() const
{

  return true;
}

bool WorkspaceOptionsGlobalsSettings::defaultScrollbarLeftClickNavigatesByPageValue_helper() const
{

  return false;
}

int WorkspaceOptionsGlobalsSettings::defaultDoubleClickIntervalValue_helper() const
{

  return 400;
}

WorkspaceOptionsGlobalsSettings::~WorkspaceOptionsGlobalsSettings()
{
}


void WorkspaceOptionsGlobalsSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalSingleClickChanged:
    Q_EMIT singleClickChanged();
    break;
  case signalDndBehaviorChanged:
    Q_EMIT dndBehaviorChanged();
    break;
  case signalSmoothScrollChanged:
    Q_EMIT smoothScrollChanged();
    break;
  case signalScrollbarLeftClickNavigatesByPageChanged:
    Q_EMIT scrollbarLeftClickNavigatesByPageChanged();
    break;
  case signalDoubleClickIntervalChanged:
    Q_EMIT doubleClickIntervalChanged();
    break;
  }
}
