// This file is generated by kconfig_compiler_kf5 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>

class Preferences : public KConfigSkeleton
{
  public:

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

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

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

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

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

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

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

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

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

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

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

    /**
      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()->isImmutable( QStringLiteral( "HintVisibleTime" ) ))
        self()->mHintVisibleTime = v;
    }

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

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

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

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

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

    /**
      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()->isImmutable( QStringLiteral( "BlackPlayerStrength" ) ))
        self()->mBlackPlayerStrength = v;
    }

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

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

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

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

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

    /**
      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()->isImmutable( QStringLiteral( "WhitePlayerStrength" ) ))
        self()->mWhitePlayerStrength = v;
    }

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

    /**
      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()->isImmutable( QStringLiteral( "BoardSize" ) ))
        self()->mBoardSize = v;
    }

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

    /**
      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()->isImmutable( QStringLiteral( "Komi" ) ))
        self()->mKomi = v;
    }

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

    /**
      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()->isImmutable( QStringLiteral( "FixedHandicapValue" ) ))
        self()->mFixedHandicapValue = v;
    }

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

  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;

  private:
};

#endif

