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

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

#include <klocalizedstring.h>

class Preferences : public KConfigSkeleton
{
  public:

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

    /**
      Set The current game engine command with (optional) parameters
    */
    static
    void setEngineCommand( const QString & v )
    {
      if (!self()->isEngineCommandImmutable())
        self()->mEngineCommand = v;
    }

    /**
      Get The current game engine command with (optional) parameters
    */
    static
    QString engineCommand()
    {
      return self()->mEngineCommand;
    }

    /**
      Is The current game engine command with (optional) parameters Immutable
    */
    static
    bool isEngineCommandImmutable()
    {
      return self()->isImmutable( QStringLiteral( "EngineCommand" ) );
    }

    /**
      Set EngineWorking
    */
    static
    void setEngineWorking( bool v )
    {
      if (!self()->isEngineWorkingImmutable())
        self()->mEngineWorking = v;
    }

    /**
      Get EngineWorking
    */
    static
    bool engineWorking()
    {
      return self()->mEngineWorking;
    }

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

    /**
      Set The graphical theme to be used
    */
    static
    void setTheme( const QString & v )
    {
      if (!self()->isThemeImmutable())
        self()->mTheme = v;
    }

    /**
      Get The graphical theme to be used
    */
    static
    QString theme()
    {
      return self()->mTheme;
    }

    /**
      Is The graphical theme to be used Immutable
    */
    static
    bool isThemeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Theme" ) );
    }

    /**
      Set Determines whether board labels are shown
    */
    static
    void setShowBoardLabels( bool v )
    {
      if (!self()->isShowBoardLabelsImmutable())
        self()->mShowBoardLabels = v;
    }

    /**
      Get Determines whether board labels are shown
    */
    static
    bool showBoardLabels()
    {
      return self()->mShowBoardLabels;
    }

    /**
      Is Determines whether board labels are shown Immutable
    */
    static
    bool isShowBoardLabelsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ShowBoardLabels" ) );
    }

    /**
      Set Move numbers are drawn onto stones if enabled
    */
    static
    void setShowMoveNumbers( bool v )
    {
      if (!self()->isShowMoveNumbersImmutable())
        self()->mShowMoveNumbers = v;
    }

    /**
      Get Move numbers are drawn onto stones if enabled
    */
    static
    bool showMoveNumbers()
    {
      return self()->mShowMoveNumbers;
    }

    /**
      Is Move numbers are drawn onto stones if enabled Immutable
    */
    static
    bool isShowMoveNumbersImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ShowMoveNumbers" ) );
    }

    /**
      Set Number of seconds for which a hint is visible
    */
    static
    void setHintVisibleTime( double v )
    {
      if (v < 1.0)
      {
        qDebug() << "setHintVisibleTime: value " << v << " is less than the minimum value of 1.0";
        v = 1.0;
      }

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

      if (!self()->isHintVisibleTimeImmutable())
        self()->mHintVisibleTime = v;
    }

    /**
      Get Number of seconds for which a hint is visible
    */
    static
    double hintVisibleTime()
    {
      return self()->mHintVisibleTime;
    }

    /**
      Is Number of seconds for which a hint is visible Immutable
    */
    static
    bool isHintVisibleTimeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "HintVisibleTime" ) );
    }

    /**
      Set Is black a human player?
    */
    static
    void setBlackPlayerHuman( bool v )
    {
      if (!self()->isBlackPlayerHumanImmutable())
        self()->mBlackPlayerHuman = v;
    }

    /**
      Get Is black a human player?
    */
    static
    bool blackPlayerHuman()
    {
      return self()->mBlackPlayerHuman;
    }

    /**
      Is Is black a human player? Immutable
    */
    static
    bool isBlackPlayerHumanImmutable()
    {
      return self()->isImmutable( QStringLiteral( "BlackPlayerHuman" ) );
    }

    /**
      Set The name of the black player
    */
    static
    void setBlackPlayerName( const QString & v )
    {
      if (!self()->isBlackPlayerNameImmutable())
        self()->mBlackPlayerName = v;
    }

    /**
      Get The name of the black player
    */
    static
    QString blackPlayerName()
    {
      return self()->mBlackPlayerName;
    }

    /**
      Is The name of the black player Immutable
    */
    static
    bool isBlackPlayerNameImmutable()
    {
      return self()->isImmutable( QStringLiteral( "BlackPlayerName" ) );
    }

    /**
      Set The strength of the black player
    */
    static
    void setBlackPlayerStrength( int v )
    {
      if (v < 1)
      {
        qDebug() << "setBlackPlayerStrength: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

      if (!self()->isBlackPlayerStrengthImmutable())
        self()->mBlackPlayerStrength = v;
    }

    /**
      Get The strength of the black player
    */
    static
    int blackPlayerStrength()
    {
      return self()->mBlackPlayerStrength;
    }

    /**
      Is The strength of the black player Immutable
    */
    static
    bool isBlackPlayerStrengthImmutable()
    {
      return self()->isImmutable( QStringLiteral( "BlackPlayerStrength" ) );
    }

    /**
      Set Is white a human player?
    */
    static
    void setWhitePlayerHuman( bool v )
    {
      if (!self()->isWhitePlayerHumanImmutable())
        self()->mWhitePlayerHuman = v;
    }

    /**
      Get Is white a human player?
    */
    static
    bool whitePlayerHuman()
    {
      return self()->mWhitePlayerHuman;
    }

    /**
      Is Is white a human player? Immutable
    */
    static
    bool isWhitePlayerHumanImmutable()
    {
      return self()->isImmutable( QStringLiteral( "WhitePlayerHuman" ) );
    }

    /**
      Set The name of the white player
    */
    static
    void setWhitePlayerName( const QString & v )
    {
      if (!self()->isWhitePlayerNameImmutable())
        self()->mWhitePlayerName = v;
    }

    /**
      Get The name of the white player
    */
    static
    QString whitePlayerName()
    {
      return self()->mWhitePlayerName;
    }

    /**
      Is The name of the white player Immutable
    */
    static
    bool isWhitePlayerNameImmutable()
    {
      return self()->isImmutable( QStringLiteral( "WhitePlayerName" ) );
    }

    /**
      Set The strength of the white player
    */
    static
    void setWhitePlayerStrength( int v )
    {
      if (v < 1)
      {
        qDebug() << "setWhitePlayerStrength: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

      if (!self()->isWhitePlayerStrengthImmutable())
        self()->mWhitePlayerStrength = v;
    }

    /**
      Get The strength of the white player
    */
    static
    int whitePlayerStrength()
    {
      return self()->mWhitePlayerStrength;
    }

    /**
      Is The strength of the white player Immutable
    */
    static
    bool isWhitePlayerStrengthImmutable()
    {
      return self()->isImmutable( QStringLiteral( "WhitePlayerStrength" ) );
    }

    /**
      Set Go board size
    */
    static
    void setBoardSize( int v )
    {
      if (v < 3)
      {
        qDebug() << "setBoardSize: value " << v << " is less than the minimum value of 3";
        v = 3;
      }

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

      if (!self()->isBoardSizeImmutable())
        self()->mBoardSize = v;
    }

    /**
      Get Go board size
    */
    static
    int boardSize()
    {
      return self()->mBoardSize;
    }

    /**
      Is Go board size Immutable
    */
    static
    bool isBoardSizeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "BoardSize" ) );
    }

    /**
      Set Komi
    */
    static
    void setKomi( double v )
    {
      if (v < 0)
      {
        qDebug() << "setKomi: value " << v << " is less than the minimum value of 0";
        v = 0;
      }

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

      if (!self()->isKomiImmutable())
        self()->mKomi = v;
    }

    /**
      Get Komi
    */
    static
    double komi()
    {
      return self()->mKomi;
    }

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

    /**
      Set Extra stones for the black player
    */
    static
    void setFixedHandicapValue( int v )
    {
      if (v < 1)
      {
        qDebug() << "setFixedHandicapValue: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

      if (!self()->isFixedHandicapValueImmutable())
        self()->mFixedHandicapValue = v;
    }

    /**
      Get Extra stones for the black player
    */
    static
    int fixedHandicapValue()
    {
      return self()->mFixedHandicapValue;
    }

    /**
      Is Extra stones for the black player Immutable
    */
    static
    bool isFixedHandicapValueImmutable()
    {
      return self()->isImmutable( QStringLiteral( "FixedHandicapValue" ) );
    }

  protected:
    Preferences();
    friend class PreferencesHelper;


    // Backend
    QString mEngineCommand;
    bool mEngineWorking;

    // UserInterface
    QString mTheme;
    bool mShowBoardLabels;
    bool mShowMoveNumbers;
    double mHintVisibleTime;

    // Game
    bool mBlackPlayerHuman;
    QString mBlackPlayerName;
    int mBlackPlayerStrength;
    bool mWhitePlayerHuman;
    QString mWhitePlayerName;
    int mWhitePlayerStrength;
    int mBoardSize;
    double mKomi;
    int mFixedHandicapValue;
};

#endif

