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

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

class Settings : public KConfigSkeleton
{
  public:
    class EnumPlaceFlagOn
    {
      public:
      enum type { MouseRelease, MousePress, COUNT };
    };

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

    /**
      Set Whether the "unsure" marker may be used.
    */
    static
    void setUseQuestionMarks( bool v )
    {
      if (!self()->isUseQuestionMarksImmutable())
        self()->mUseQuestionMarks = v;
    }

    /**
      Get Whether the "unsure" marker may be used.
    */
    static
    bool useQuestionMarks()
    {
      return self()->mUseQuestionMarks;
    }

    /**
      Is Whether the "unsure" marker may be used. Immutable
    */
    static
    bool isUseQuestionMarksImmutable()
    {
      return self()->isImmutable( QStringLiteral( "UseQuestionMarks" ) );
    }

    /**
      Set kmines_reset
    */
    static
    void setAllowKminesReset( bool v )
    {
      if (!self()->isAllowKminesResetImmutable())
        self()->mAllowKminesReset = v;
    }

    /**
      Get kmines_reset
    */
    static
    bool allowKminesReset()
    {
      return self()->mAllowKminesReset;
    }

    /**
      Is kmines_reset Immutable
    */
    static
    bool isAllowKminesResetImmutable()
    {
      return self()->isImmutable( QStringLiteral( "AllowKminesReset" ) );
    }

    /**
      Set disable_score_on_reset
    */
    static
    void setDisableScoreOnReset( bool v )
    {
      if (!self()->isDisableScoreOnResetImmutable())
        self()->mDisableScoreOnReset = v;
    }

    /**
      Get disable_score_on_reset
    */
    static
    bool disableScoreOnReset()
    {
      return self()->mDisableScoreOnReset;
    }

    /**
      Is disable_score_on_reset Immutable
    */
    static
    bool isDisableScoreOnResetImmutable()
    {
      return self()->isImmutable( QStringLiteral( "DisableScoreOnReset" ) );
    }

    /**
      Set Left click on a number cell will have the same effect as mid click.
    */
    static
    void setExploreWithLeftClickOnNumberCells( bool v )
    {
      if (!self()->isExploreWithLeftClickOnNumberCellsImmutable())
        self()->mExploreWithLeftClickOnNumberCells = v;
    }

    /**
      Get Left click on a number cell will have the same effect as mid click.
    */
    static
    bool exploreWithLeftClickOnNumberCells()
    {
      return self()->mExploreWithLeftClickOnNumberCells;
    }

    /**
      Is Left click on a number cell will have the same effect as mid click. Immutable
    */
    static
    bool isExploreWithLeftClickOnNumberCellsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ExploreWithLeftClickOnNumberCells" ) );
    }

    /**
      Set place_flag_on
    */
    static
    void setPlaceFlagOn( int v )
    {
      if (!self()->isPlaceFlagOnImmutable())
        self()->mPlaceFlagOn = v;
    }

    /**
      Get place_flag_on
    */
    static
    int placeFlagOn()
    {
      return self()->mPlaceFlagOn;
    }

    /**
      Is place_flag_on Immutable
    */
    static
    bool isPlaceFlagOnImmutable()
    {
      return self()->isImmutable( QStringLiteral( "PlaceFlagOn" ) );
    }

    /**
      Set The width of the playing field.
    */
    static
    void setCustomWidth( int v )
    {
      if (v < 5)
      {
        qDebug() << "setCustomWidth: value " << v << " is less than the minimum value of 5";
        v = 5;
      }

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

      if (!self()->isCustomWidthImmutable())
        self()->mCustomWidth = v;
    }

    /**
      Get The width of the playing field.
    */
    static
    int customWidth()
    {
      return self()->mCustomWidth;
    }

    /**
      Is The width of the playing field. Immutable
    */
    static
    bool isCustomWidthImmutable()
    {
      return self()->isImmutable( QStringLiteral( "CustomWidth" ) );
    }

    /**
      Set The height of the playing field.
    */
    static
    void setCustomHeight( int v )
    {
      if (v < 5)
      {
        qDebug() << "setCustomHeight: value " << v << " is less than the minimum value of 5";
        v = 5;
      }

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

      if (!self()->isCustomHeightImmutable())
        self()->mCustomHeight = v;
    }

    /**
      Get The height of the playing field.
    */
    static
    int customHeight()
    {
      return self()->mCustomHeight;
    }

    /**
      Is The height of the playing field. Immutable
    */
    static
    bool isCustomHeightImmutable()
    {
      return self()->isImmutable( QStringLiteral( "CustomHeight" ) );
    }

    /**
      Set The number of mines in the playing field.
    */
    static
    void setCustomMines( int v )
    {
      if (v < 1)
      {
        qDebug() << "setCustomMines: value " << v << " is less than the minimum value of 1";
        v = 1;
      }
      if (!self()->isCustomMinesImmutable())
        self()->mCustomMines = v;
    }

    /**
      Get The number of mines in the playing field.
    */
    static
    int customMines()
    {
      return self()->mCustomMines;
    }

    /**
      Is The number of mines in the playing field. Immutable
    */
    static
    bool isCustomMinesImmutable()
    {
      return self()->isImmutable( QStringLiteral( "CustomMines" ) );
    }

  protected:
    Settings();
    friend class SettingsHelper;


    // General
    bool mUseQuestionMarks;
    bool mAllowKminesReset;
    bool mDisableScoreOnReset;
    bool mExploreWithLeftClickOnNumberCells;
    int mPlaceFlagOn;

    // Options
    int mCustomWidth;
    int mCustomHeight;
    int mCustomMines;
};

#endif

