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

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

class KlipperSettings : public KConfigSkeleton
{
  public:

    static KlipperSettings *self();
    ~KlipperSettings() override;

    /**
      Set Klipper version
    */
    static
    void setVersion( const QString & v )
    {
      if (!self()->isVersionImmutable())
        self()->mVersion = v;
    }

    /**
      Get Klipper version
    */
    static
    QString version()
    {
      return self()->mVersion;
    }

    /**
      Is Klipper version Immutable
    */
    static
    bool isVersionImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Version" ) );
    }

    /**
      Get Item object corresponding to Version()
    */
    ItemString *versionItem()
    {
      return mVersionItem;
    }

    /**
      Set Save history across desktop sessions
    */
    static
    void setKeepClipboardContents( bool v )
    {
      if (!self()->isKeepClipboardContentsImmutable())
        self()->mKeepClipboardContents = v;
    }

    /**
      Get Save history across desktop sessions
    */
    static
    bool keepClipboardContents()
    {
      return self()->mKeepClipboardContents;
    }

    /**
      Is Save history across desktop sessions Immutable
    */
    static
    bool isKeepClipboardContentsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "KeepClipboardContents" ) );
    }

    /**
      Get Item object corresponding to KeepClipboardContents()
    */
    ItemBool *keepClipboardContentsItem()
    {
      return mKeepClipboardContentsItem;
    }

    /**
      Set Prevent the clipboard from being cleared
    */
    static
    void setPreventEmptyClipboard( bool v )
    {
      if (!self()->isPreventEmptyClipboardImmutable())
        self()->mPreventEmptyClipboard = v;
    }

    /**
      Get Prevent the clipboard from being cleared
    */
    static
    bool preventEmptyClipboard()
    {
      return self()->mPreventEmptyClipboard;
    }

    /**
      Is Prevent the clipboard from being cleared Immutable
    */
    static
    bool isPreventEmptyClipboardImmutable()
    {
      return self()->isImmutable( QStringLiteral( "PreventEmptyClipboard" ) );
    }

    /**
      Get Item object corresponding to PreventEmptyClipboard()
    */
    ItemBool *preventEmptyClipboardItem()
    {
      return mPreventEmptyClipboardItem;
    }

    /**
      Set Backwards compatibility, don't touch.
    */
    static
    void setSynchronize( int v )
    {
      if (!self()->isSynchronizeImmutable())
        self()->mSynchronize = v;
    }

    /**
      Get Backwards compatibility, don't touch.
    */
    static
    int synchronize()
    {
      return self()->mSynchronize;
    }

    /**
      Is Backwards compatibility, don't touch. Immutable
    */
    static
    bool isSynchronizeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Synchronize" ) );
    }

    /**
      Get Item object corresponding to Synchronize()
    */
    ItemInt *synchronizeItem()
    {
      return mSynchronizeItem;
    }

    /**
      Set Keep the selection and clipboard the same
    */
    static
    void setSyncClipboards( bool v )
    {
      if (!self()->isSyncClipboardsImmutable())
        self()->mSyncClipboards = v;
    }

    /**
      Get Keep the selection and clipboard the same
    */
    static
    bool syncClipboards()
    {
      return self()->mSyncClipboards;
    }

    /**
      Is Keep the selection and clipboard the same Immutable
    */
    static
    bool isSyncClipboardsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "SyncClipboards" ) );
    }

    /**
      Get Item object corresponding to SyncClipboards()
    */
    ItemBool *syncClipboardsItem()
    {
      return mSyncClipboardsItem;
    }

    /**
      Set Ignore the selection
    */
    static
    void setIgnoreSelection( bool v )
    {
      if (!self()->isIgnoreSelectionImmutable())
        self()->mIgnoreSelection = v;
    }

    /**
      Get Ignore the selection
    */
    static
    bool ignoreSelection()
    {
      return self()->mIgnoreSelection;
    }

    /**
      Is Ignore the selection Immutable
    */
    static
    bool isIgnoreSelectionImmutable()
    {
      return self()->isImmutable( QStringLiteral( "IgnoreSelection" ) );
    }

    /**
      Get Item object corresponding to IgnoreSelection()
    */
    ItemBool *ignoreSelectionItem()
    {
      return mIgnoreSelectionItem;
    }

    /**
      Set Text selection only
    */
    static
    void setSelectionTextOnly( bool v )
    {
      if (!self()->isSelectionTextOnlyImmutable())
        self()->mSelectionTextOnly = v;
    }

    /**
      Get Text selection only
    */
    static
    bool selectionTextOnly()
    {
      return self()->mSelectionTextOnly;
    }

    /**
      Is Text selection only Immutable
    */
    static
    bool isSelectionTextOnlyImmutable()
    {
      return self()->isImmutable( QStringLiteral( "SelectionTextOnly" ) );
    }

    /**
      Get Item object corresponding to SelectionTextOnly()
    */
    ItemBool *selectionTextOnlyItem()
    {
      return mSelectionTextOnlyItem;
    }

    /**
      Set Always ignore images
    */
    static
    void setIgnoreImages( bool v )
    {
      if (!self()->isIgnoreImagesImmutable())
        self()->mIgnoreImages = v;
    }

    /**
      Get Always ignore images
    */
    static
    bool ignoreImages()
    {
      return self()->mIgnoreImages;
    }

    /**
      Is Always ignore images Immutable
    */
    static
    bool isIgnoreImagesImmutable()
    {
      return self()->isImmutable( QStringLiteral( "IgnoreImages" ) );
    }

    /**
      Get Item object corresponding to IgnoreImages()
    */
    ItemBool *ignoreImagesItem()
    {
      return mIgnoreImagesItem;
    }

    /**
      Set Immediately on selection
    */
    static
    void setURLGrabberEnabled( bool v )
    {
      if (!self()->isURLGrabberEnabledImmutable())
        self()->mURLGrabberEnabled = v;
    }

    /**
      Get Immediately on selection
    */
    static
    bool uRLGrabberEnabled()
    {
      return self()->mURLGrabberEnabled;
    }

    /**
      Is Immediately on selection Immutable
    */
    static
    bool isURLGrabberEnabledImmutable()
    {
      return self()->isImmutable( QStringLiteral( "URLGrabberEnabled" ) );
    }

    /**
      Get Item object corresponding to URLGrabberEnabled()
    */
    ItemBool *uRLGrabberEnabledItem()
    {
      return mURLGrabberEnabledItem;
    }

    /**
      Set Automatic action menu time:
    */
    static
    void setTimeoutForActionPopups( int v )
    {
      if (v < 0)
      {
        qDebug() << "setTimeoutForActionPopups: value " << v << " is less than the minimum value of 0";
        v = 0;
      }

      if (v > 200)
      {
        qDebug() << "setTimeoutForActionPopups: value " << v << " is greater than the maximum value of 200";
        v = 200;
      }

      if (!self()->isTimeoutForActionPopupsImmutable())
        self()->mTimeoutForActionPopups = v;
    }

    /**
      Get Automatic action menu time:
    */
    static
    int timeoutForActionPopups()
    {
      return self()->mTimeoutForActionPopups;
    }

    /**
      Is Automatic action menu time: Immutable
    */
    static
    bool isTimeoutForActionPopupsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "TimeoutForActionPopups" ) );
    }

    /**
      Get Item object corresponding to TimeoutForActionPopups()
    */
    ItemInt *timeoutForActionPopupsItem()
    {
      return mTimeoutForActionPopupsItem;
    }

    /**
      Set History size:
    */
    static
    void setMaxClipItems( int v )
    {
      if (v < 1)
      {
        qDebug() << "setMaxClipItems: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

      if (v > 2048)
      {
        qDebug() << "setMaxClipItems: value " << v << " is greater than the maximum value of 2048";
        v = 2048;
      }

      if (!self()->isMaxClipItemsImmutable())
        self()->mMaxClipItems = v;
    }

    /**
      Get History size:
    */
    static
    int maxClipItems()
    {
      return self()->mMaxClipItems;
    }

    /**
      Is History size: Immutable
    */
    static
    bool isMaxClipItemsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "MaxClipItems" ) );
    }

    /**
      Get Item object corresponding to MaxClipItems()
    */
    ItemInt *maxClipItemsItem()
    {
      return mMaxClipItemsItem;
    }

    /**
      Set Dummy entry for indicating changes in an action's tree widget
    */
    static
    void setActionList( int v )
    {
      if (!self()->isActionListImmutable())
        self()->mActionList = v;
    }

    /**
      Get Dummy entry for indicating changes in an action's tree widget
    */
    static
    int actionList()
    {
      return self()->mActionList;
    }

    /**
      Is Dummy entry for indicating changes in an action's tree widget Immutable
    */
    static
    bool isActionListImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ActionList" ) );
    }

    /**
      Get Item object corresponding to ActionList()
    */
    ItemInt *actionListItem()
    {
      return mActionListItem;
    }

    /**
      Set ActionsInfoMessageShown
    */
    static
    void setActionsInfoMessageShown( bool v )
    {
      if (!self()->isActionsInfoMessageShownImmutable())
        self()->mActionsInfoMessageShown = v;
    }

    /**
      Get ActionsInfoMessageShown
    */
    static
    bool actionsInfoMessageShown()
    {
      return self()->mActionsInfoMessageShown;
    }

    /**
      Is ActionsInfoMessageShown Immutable
    */
    static
    bool isActionsInfoMessageShownImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ActionsInfoMessageShown" ) );
    }

    /**
      Get Item object corresponding to ActionsInfoMessageShown()
    */
    ItemBool *actionsInfoMessageShownItem()
    {
      return mActionsInfoMessageShownItem;
    }

    /**
      Set Trim whitespace from selection
    */
    static
    void setStripWhiteSpace( bool v )
    {
      if (!self()->isStripWhiteSpaceImmutable())
        self()->mStripWhiteSpace = v;
    }

    /**
      Get Trim whitespace from selection
    */
    static
    bool stripWhiteSpace()
    {
      return self()->mStripWhiteSpace;
    }

    /**
      Is Trim whitespace from selection Immutable
    */
    static
    bool isStripWhiteSpaceImmutable()
    {
      return self()->isImmutable( QStringLiteral( "StripWhiteSpace" ) );
    }

    /**
      Get Item object corresponding to StripWhiteSpace()
    */
    ItemBool *stripWhiteSpaceItem()
    {
      return mStripWhiteSpaceItem;
    }

    /**
      Set For an item chosen from history
    */
    static
    void setReplayActionInHistory( bool v )
    {
      if (!self()->isReplayActionInHistoryImmutable())
        self()->mReplayActionInHistory = v;
    }

    /**
      Get For an item chosen from history
    */
    static
    bool replayActionInHistory()
    {
      return self()->mReplayActionInHistory;
    }

    /**
      Is For an item chosen from history Immutable
    */
    static
    bool isReplayActionInHistoryImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ReplayActionInHistory" ) );
    }

    /**
      Get Item object corresponding to ReplayActionInHistory()
    */
    ItemBool *replayActionInHistoryItem()
    {
      return mReplayActionInHistoryItem;
    }

    /**
      Set Include MIME actions
    */
    static
    void setEnableMagicMimeActions( bool v )
    {
      if (!self()->isEnableMagicMimeActionsImmutable())
        self()->mEnableMagicMimeActions = v;
    }

    /**
      Get Include MIME actions
    */
    static
    bool enableMagicMimeActions()
    {
      return self()->mEnableMagicMimeActions;
    }

    /**
      Is Include MIME actions Immutable
    */
    static
    bool isEnableMagicMimeActionsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "EnableMagicMimeActions" ) );
    }

    /**
      Get Item object corresponding to EnableMagicMimeActions()
    */
    ItemBool *enableMagicMimeActionsItem()
    {
      return mEnableMagicMimeActionsItem;
    }

  protected:
    KlipperSettings();
    friend class KlipperSettingsHelper;


    // General
    QString mVersion;
    bool mKeepClipboardContents;
    bool mPreventEmptyClipboard;
    int mSynchronize;
    bool mSyncClipboards;
    bool mIgnoreSelection;
    bool mSelectionTextOnly;
    bool mIgnoreImages;
    bool mURLGrabberEnabled;
    int mTimeoutForActionPopups;
    int mMaxClipItems;
    int mActionList;
    bool mActionsInfoMessageShown;

    // Actions
    bool mStripWhiteSpace;
    bool mReplayActionInHistory;
    bool mEnableMagicMimeActions;

  private:
    ItemString *mVersionItem;
    ItemBool *mKeepClipboardContentsItem;
    ItemBool *mPreventEmptyClipboardItem;
    ItemInt *mSynchronizeItem;
    ItemBool *mSyncClipboardsItem;
    ItemBool *mIgnoreSelectionItem;
    ItemBool *mSelectionTextOnlyItem;
    ItemBool *mIgnoreImagesItem;
    ItemBool *mURLGrabberEnabledItem;
    ItemInt *mTimeoutForActionPopupsItem;
    ItemInt *mMaxClipItemsItem;
    ItemInt *mActionListItem;
    ItemBool *mActionsInfoMessageShownItem;
    ItemBool *mStripWhiteSpaceItem;
    ItemBool *mReplayActionInHistoryItem;
    ItemBool *mEnableMagicMimeActionsItem;
};

#endif

