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

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

class WorkspaceOptionsGlobalsSettings : public KConfigSkeleton
{
  Q_OBJECT
  public:
    enum DndBehaviorChoices { AlwaysAsk, MoveIfSameDevice };
    Q_ENUM(DndBehaviorChoices)

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

    /**
      Set Single click to open files
    */
    void setSingleClick( bool v )
    {
      if (v != mSingleClick && !isSingleClickImmutable()) {
        mSingleClick = v;
        Q_EMIT singleClickChanged();
      }
    }

    Q_PROPERTY(bool singleClick READ singleClick WRITE setSingleClick NOTIFY singleClickChanged)
    Q_PROPERTY(bool isSingleClickImmutable READ isSingleClickImmutable CONSTANT)
    Q_PROPERTY(bool defaultSingleClickValue READ defaultSingleClickValue CONSTANT)
    /**
      Get Single click to open files
    */
    bool singleClick() const
    {
      return mSingleClick;
    }

    /**
      Is Single click to open files Immutable
    */
    bool isSingleClickImmutable() const
    {
      return isImmutable( QStringLiteral( "singleClick" ) );
    }

    /**
      Get Single click to open files default value
    */
    bool defaultSingleClickValue() const
    {
        return defaultSingleClickValue_helper();
    }

    /**
      Set For local files on the same device, whether dragging and dropping will perform a move operation instead of showing the options menu
    */
    void setDndBehavior( int v )
    {
      if (v != mDndBehavior && !isDndBehaviorImmutable()) {
        mDndBehavior = v;
        Q_EMIT dndBehaviorChanged();
      }
    }

    Q_PROPERTY(int dndBehavior READ dndBehavior WRITE setDndBehavior NOTIFY dndBehaviorChanged)
    Q_PROPERTY(bool isDndBehaviorImmutable READ isDndBehaviorImmutable CONSTANT)
    Q_PROPERTY(int defaultDndBehaviorValue READ defaultDndBehaviorValue CONSTANT)
    /**
      Get For local files on the same device, whether dragging and dropping will perform a move operation instead of showing the options menu
    */
    int dndBehavior() const
    {
      return mDndBehavior;
    }

    /**
      Is For local files on the same device, whether dragging and dropping will perform a move operation instead of showing the options menu Immutable
    */
    bool isDndBehaviorImmutable() const
    {
      return isImmutable( QStringLiteral( "dndBehavior" ) );
    }

    /**
      Get For local files on the same device, whether dragging and dropping will perform a move operation instead of showing the options menu default value
    */
    int defaultDndBehaviorValue() const
    {
        return defaultDndBehaviorValue_helper();
    }

    /**
      Set Smooth scrolling
    */
    void setSmoothScroll( bool v )
    {
      if (v != mSmoothScroll && !isSmoothScrollImmutable()) {
        mSmoothScroll = v;
        Q_EMIT smoothScrollChanged();
      }
    }

    Q_PROPERTY(bool smoothScroll READ smoothScroll WRITE setSmoothScroll NOTIFY smoothScrollChanged)
    Q_PROPERTY(bool isSmoothScrollImmutable READ isSmoothScrollImmutable CONSTANT)
    Q_PROPERTY(bool defaultSmoothScrollValue READ defaultSmoothScrollValue CONSTANT)
    /**
      Get Smooth scrolling
    */
    bool smoothScroll() const
    {
      return mSmoothScroll;
    }

    /**
      Is Smooth scrolling Immutable
    */
    bool isSmoothScrollImmutable() const
    {
      return isImmutable( QStringLiteral( "smoothScroll" ) );
    }

    /**
      Get Smooth scrolling default value
    */
    bool defaultSmoothScrollValue() const
    {
        return defaultSmoothScrollValue_helper();
    }

    /**
      Set Left-click in scrollbar track moves scrollbar by one page
    */
    void setScrollbarLeftClickNavigatesByPage( bool v )
    {
      if (v != mScrollbarLeftClickNavigatesByPage && !isScrollbarLeftClickNavigatesByPageImmutable()) {
        mScrollbarLeftClickNavigatesByPage = v;
        Q_EMIT scrollbarLeftClickNavigatesByPageChanged();
      }
    }

    Q_PROPERTY(bool scrollbarLeftClickNavigatesByPage READ scrollbarLeftClickNavigatesByPage WRITE setScrollbarLeftClickNavigatesByPage NOTIFY scrollbarLeftClickNavigatesByPageChanged)
    Q_PROPERTY(bool isScrollbarLeftClickNavigatesByPageImmutable READ isScrollbarLeftClickNavigatesByPageImmutable CONSTANT)
    Q_PROPERTY(bool defaultScrollbarLeftClickNavigatesByPageValue READ defaultScrollbarLeftClickNavigatesByPageValue CONSTANT)
    /**
      Get Left-click in scrollbar track moves scrollbar by one page
    */
    bool scrollbarLeftClickNavigatesByPage() const
    {
      return mScrollbarLeftClickNavigatesByPage;
    }

    /**
      Is Left-click in scrollbar track moves scrollbar by one page Immutable
    */
    bool isScrollbarLeftClickNavigatesByPageImmutable() const
    {
      return isImmutable( QStringLiteral( "scrollbarLeftClickNavigatesByPage" ) );
    }

    /**
      Get Left-click in scrollbar track moves scrollbar by one page default value
    */
    bool defaultScrollbarLeftClickNavigatesByPageValue() const
    {
        return defaultScrollbarLeftClickNavigatesByPageValue_helper();
    }

    /**
      Set Double click interval
    */
    void setDoubleClickInterval( int v )
    {
      if (v < 100)
      {
        qDebug() << "setDoubleClickInterval: value " << v << " is less than the minimum value of 100";
        v = 100;
      }

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

      if (v != mDoubleClickInterval && !isDoubleClickIntervalImmutable()) {
        mDoubleClickInterval = v;
        Q_EMIT doubleClickIntervalChanged();
      }
    }

    Q_PROPERTY(int doubleClickInterval READ doubleClickInterval WRITE setDoubleClickInterval NOTIFY doubleClickIntervalChanged)
    Q_PROPERTY(bool isDoubleClickIntervalImmutable READ isDoubleClickIntervalImmutable CONSTANT)
    Q_PROPERTY(int defaultDoubleClickIntervalValue READ defaultDoubleClickIntervalValue CONSTANT)
    /**
      Get Double click interval
    */
    int doubleClickInterval() const
    {
      return mDoubleClickInterval;
    }

    /**
      Is Double click interval Immutable
    */
    bool isDoubleClickIntervalImmutable() const
    {
      return isImmutable( QStringLiteral( "doubleClickInterval" ) );
    }

    /**
      Get Double click interval default value
    */
    int defaultDoubleClickIntervalValue() const
    {
        return defaultDoubleClickIntervalValue_helper();
    }


    enum {
      signalSingleClickChanged = 1,
      signalDndBehaviorChanged = 2,
      signalSmoothScrollChanged = 3,
      signalScrollbarLeftClickNavigatesByPageChanged = 4,
      signalDoubleClickIntervalChanged = 5
    };

  Q_SIGNALS:
    void singleClickChanged();

    void dndBehaviorChanged();

    void smoothScrollChanged();

    void scrollbarLeftClickNavigatesByPageChanged();

    void doubleClickIntervalChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:

    // KDE
    bool mSingleClick;
    bool defaultSingleClickValue_helper() const;
    int mDndBehavior;
    int defaultDndBehaviorValue_helper() const;
    bool mSmoothScroll;
    bool defaultSmoothScrollValue_helper() const;
    bool mScrollbarLeftClickNavigatesByPage;
    bool defaultScrollbarLeftClickNavigatesByPageValue_helper() const;
    int mDoubleClickInterval;
    int defaultDoubleClickIntervalValue_helper() const;
};

#endif

