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

#include "krunnersettingsbase.h"

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

  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigCompilerSignallingItem  *itemFreeFloating;
  KConfigSkeleton::ItemBool  *innerItemFreeFloating;
  innerItemFreeFloating = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "FreeFloating" ), mFreeFloating, false );
  itemFreeFloating = new KConfigCompilerSignallingItem(innerItemFreeFloating, this, notifyFunction, signalFreeFloatingChanged);
  itemFreeFloating->setWriteFlags(KConfigBase::Notify);
  addItem( itemFreeFloating, QStringLiteral( "freeFloating" ) );
  KConfigCompilerSignallingItem  *itemActivateWhenTypingOnDesktop;
  KConfigSkeleton::ItemBool  *innerItemActivateWhenTypingOnDesktop;
  innerItemActivateWhenTypingOnDesktop = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ActivateWhenTypingOnDesktop" ), mActivateWhenTypingOnDesktop, true );
  itemActivateWhenTypingOnDesktop = new KConfigCompilerSignallingItem(innerItemActivateWhenTypingOnDesktop, this, notifyFunction, signalActivateWhenTypingOnDesktopChanged);
  itemActivateWhenTypingOnDesktop->setWriteFlags(KConfigBase::Notify);
  addItem( itemActivateWhenTypingOnDesktop, QStringLiteral( "activateWhenTypingOnDesktop" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valueshistoryBehavior;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Disabled");
    valueshistoryBehavior.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ImmediateCompletion");
    valueshistoryBehavior.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("CompletionSuggestion");
    valueshistoryBehavior.append( choice );
  }
  KConfigCompilerSignallingItem  *itemHistoryBehavior;
  KConfigSkeleton::ItemEnum  *innerItemHistoryBehavior;
  innerItemHistoryBehavior = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "historyBehavior" ), mHistoryBehavior, valueshistoryBehavior, CompletionSuggestion );
  itemHistoryBehavior = new KConfigCompilerSignallingItem(innerItemHistoryBehavior, this, notifyFunction, signalHistoryBehaviorChanged);
  itemHistoryBehavior->setWriteFlags(KConfigBase::Notify);
  addItem( itemHistoryBehavior, QStringLiteral( "historyBehavior" ) );
  KConfigCompilerSignallingItem  *itemRetainPriorSearch;
  KConfigSkeleton::ItemBool  *innerItemRetainPriorSearch;
  innerItemRetainPriorSearch = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "RetainPriorSearch" ), mRetainPriorSearch, true );
  itemRetainPriorSearch = new KConfigCompilerSignallingItem(innerItemRetainPriorSearch, this, notifyFunction, signalRetainPriorSearchChanged);
  itemRetainPriorSearch->setWriteFlags(KConfigBase::Notify);
  addItem( itemRetainPriorSearch, QStringLiteral( "retainPriorSearch" ) );
}

bool KRunnerSettingsBase::defaultFreeFloatingValue_helper() const
{

  return false;
}

bool KRunnerSettingsBase::defaultActivateWhenTypingOnDesktopValue_helper() const
{

  return true;
}

int KRunnerSettingsBase::defaultHistoryBehaviorValue_helper() const
{

  return CompletionSuggestion;
}

bool KRunnerSettingsBase::defaultRetainPriorSearchValue_helper() const
{

  return true;
}

KRunnerSettingsBase::~KRunnerSettingsBase()
{
}


void KRunnerSettingsBase::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalFreeFloatingChanged:
    Q_EMIT freeFloatingChanged();
    break;
  case signalActivateWhenTypingOnDesktopChanged:
    Q_EMIT activateWhenTypingOnDesktopChanged();
    break;
  case signalHistoryBehaviorChanged:
    Q_EMIT historyBehaviorChanged();
    break;
  case signalRetainPriorSearchChanged:
    Q_EMIT retainPriorSearchChanged();
    break;
  }
}
