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

#include <qglobal.h>
#include <kconfigskeleton.h>
#include <QCoreApplication>
#include <QDebug>

class KRunnerSettingsBase : public KConfigSkeleton
{
  Q_OBJECT
  public:
    enum EnumHistoryBehavior { Disabled, ImmediateCompletion, CompletionSuggestion };
    Q_ENUM(EnumHistoryBehavior)

    KRunnerSettingsBase( QObject *parent = nullptr );
    ~KRunnerSettingsBase() override;

    /**
      Set FreeFloating
    */
    void setFreeFloating( bool v )
    {
      if (v != mFreeFloating && !isFreeFloatingImmutable()) {
        mFreeFloating = v;
        Q_EMIT freeFloatingChanged();
      }
    }

    Q_PROPERTY(bool freeFloating READ freeFloating WRITE setFreeFloating NOTIFY freeFloatingChanged)
    Q_PROPERTY(bool isFreeFloatingImmutable READ isFreeFloatingImmutable CONSTANT)
    Q_PROPERTY(bool defaultFreeFloatingValue READ defaultFreeFloatingValue CONSTANT)
    /**
      Get FreeFloating
    */
    bool freeFloating() const
    {
      return mFreeFloating;
    }

    /**
      Is FreeFloating Immutable
    */
    bool isFreeFloatingImmutable() const
    {
      return isImmutable( QStringLiteral( "freeFloating" ) );
    }

    /**
      Get FreeFloating default value
    */
    bool defaultFreeFloatingValue() const
    {
        return defaultFreeFloatingValue_helper();
    }

    /**
      Set Option to determine the behavior of KRunner's history and history completion
    */
    void setHistoryBehavior( int v )
    {
      if (v != mHistoryBehavior && !isHistoryBehaviorImmutable()) {
        mHistoryBehavior = v;
        Q_EMIT historyBehaviorChanged();
      }
    }

    Q_PROPERTY(int historyBehavior READ historyBehavior WRITE setHistoryBehavior NOTIFY historyBehaviorChanged)
    Q_PROPERTY(bool isHistoryBehaviorImmutable READ isHistoryBehaviorImmutable CONSTANT)
    Q_PROPERTY(int defaultHistoryBehaviorValue READ defaultHistoryBehaviorValue CONSTANT)
    /**
      Get Option to determine the behavior of KRunner's history and history completion
    */
    int historyBehavior() const
    {
      return mHistoryBehavior;
    }

    /**
      Is Option to determine the behavior of KRunner's history and history completion Immutable
    */
    bool isHistoryBehaviorImmutable() const
    {
      return isImmutable( QStringLiteral( "historyBehavior" ) );
    }

    /**
      Get Option to determine the behavior of KRunner's history and history completion default value
    */
    int defaultHistoryBehaviorValue() const
    {
        return defaultHistoryBehaviorValue_helper();
    }

    /**
      Set RetainPriorSearch
    */
    void setRetainPriorSearch( bool v )
    {
      if (v != mRetainPriorSearch && !isRetainPriorSearchImmutable()) {
        mRetainPriorSearch = v;
        Q_EMIT retainPriorSearchChanged();
      }
    }

    Q_PROPERTY(bool retainPriorSearch READ retainPriorSearch WRITE setRetainPriorSearch NOTIFY retainPriorSearchChanged)
    Q_PROPERTY(bool isRetainPriorSearchImmutable READ isRetainPriorSearchImmutable CONSTANT)
    Q_PROPERTY(bool defaultRetainPriorSearchValue READ defaultRetainPriorSearchValue CONSTANT)
    /**
      Get RetainPriorSearch
    */
    bool retainPriorSearch() const
    {
      return mRetainPriorSearch;
    }

    /**
      Is RetainPriorSearch Immutable
    */
    bool isRetainPriorSearchImmutable() const
    {
      return isImmutable( QStringLiteral( "retainPriorSearch" ) );
    }

    /**
      Get RetainPriorSearch default value
    */
    bool defaultRetainPriorSearchValue() const
    {
        return defaultRetainPriorSearchValue_helper();
    }


    enum {
      signalFreeFloatingChanged = 1,
      signalHistoryBehaviorChanged = 2,
      signalRetainPriorSearchChanged = 3
    };

  Q_SIGNALS:
    void freeFloatingChanged();

    void historyBehaviorChanged();

    void retainPriorSearchChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:

    // General
    bool mFreeFloating;
    bool defaultFreeFloatingValue_helper() const;
    int mHistoryBehavior;
    int defaultHistoryBehaviorValue_helper() const;
    bool mRetainPriorSearch;
    bool defaultRetainPriorSearchValue_helper() const;
};

#endif

