// This file is generated by kconfig_compiler_kf5 from kjumpingcube.kcfg.
// All changes you do to this file will be lost.
#ifndef PREFS_H
#define PREFS_H

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

class Prefs : public KConfigSkeleton
{
  public:
    class EnumSkill1
    {
      public:
      enum type { Beginner, Novice, Average, Strong, Expert, COUNT };
    };
    class EnumSkill2
    {
      public:
      enum type { Beginner, Novice, Average, Strong, Expert, COUNT };
    };

    static Prefs *self();
    ~Prefs();


    /**
      Get Animation speed of overflowing dice
    */
    static
    int animationSpeed()
    {
      return self()->mAnimationSpeed;
    }


    /**
      Get Animation type None (no pauses).
    */
    static
    bool animationNone()
    {
      return self()->mAnimationNone;
    }


    /**
      Get Animation type Darken and pause.
    */
    static
    bool animationDelay()
    {
      return self()->mAnimationDelay;
    }


    /**
      Get Animation type Blink rapidly.
    */
    static
    bool animationBlink()
    {
      return self()->mAnimationBlink;
    }


    /**
      Get Animation type Scatter dots.
    */
    static
    bool animationSpread()
    {
      return self()->mAnimationSpread;
    }


    /**
      Get Color of neutral cubes.
    */
    static
    QColor color0()
    {
      return self()->mColor0;
    }


    /**
      Get Color of player 1.
    */
    static
    QColor color1()
    {
      return self()->mColor1;
    }


    /**
      Get Color of player 2.
    */
    static
    QColor color2()
    {
      return self()->mColor2;
    }

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

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

      if (!self()->isImmutable( QStringLiteral( "CubeDim" ) ))
        self()->mCubeDim = v;
    }

    /**
      Get Size of the playing field.
    */
    static
    int cubeDim()
    {
      return self()->mCubeDim;
    }

    /**
      Set Whether player 1 is played by the computer.
    */
    static
    void setComputerPlayer1( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ComputerPlayer1" ) ))
        self()->mComputerPlayer1 = v;
    }

    /**
      Get Whether player 1 is played by the computer.
    */
    static
    bool computerPlayer1()
    {
      return self()->mComputerPlayer1;
    }

    /**
      Set Whether computer player 1 uses Kepler AI.
    */
    static
    void setKepler1( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "Kepler1" ) ))
        self()->mKepler1 = v;
    }

    /**
      Get Whether computer player 1 uses Kepler AI.
    */
    static
    bool kepler1()
    {
      return self()->mKepler1;
    }

    /**
      Set Whether computer player 1 uses Newton AI.
    */
    static
    void setNewton1( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "Newton1" ) ))
        self()->mNewton1 = v;
    }

    /**
      Get Whether computer player 1 uses Newton AI.
    */
    static
    bool newton1()
    {
      return self()->mNewton1;
    }

    /**
      Set Skill of computer player 1.
    */
    static
    void setSkill1( int v )
    {
      if (!self()->isImmutable( QStringLiteral( "Skill1" ) ))
        self()->mSkill1 = v;
    }

    /**
      Get Skill of computer player 1.
    */
    static
    int skill1()
    {
      return self()->mSkill1;
    }

    /**
      Set Whether player 2 is played by the computer.
    */
    static
    void setComputerPlayer2( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ComputerPlayer2" ) ))
        self()->mComputerPlayer2 = v;
    }

    /**
      Get Whether player 2 is played by the computer.
    */
    static
    bool computerPlayer2()
    {
      return self()->mComputerPlayer2;
    }

    /**
      Set Whether computer player 2 uses Kepler AI.
    */
    static
    void setKepler2( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "Kepler2" ) ))
        self()->mKepler2 = v;
    }

    /**
      Get Whether computer player 2 uses Kepler AI.
    */
    static
    bool kepler2()
    {
      return self()->mKepler2;
    }

    /**
      Set Whether computer player 2 uses Newton AI.
    */
    static
    void setNewton2( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "Newton2" ) ))
        self()->mNewton2 = v;
    }

    /**
      Get Whether computer player 2 uses Newton AI.
    */
    static
    bool newton2()
    {
      return self()->mNewton2;
    }

    /**
      Set Skill of computer player 2.
    */
    static
    void setSkill2( int v )
    {
      if (!self()->isImmutable( QStringLiteral( "Skill2" ) ))
        self()->mSkill2 = v;
    }

    /**
      Get Skill of computer player 2.
    */
    static
    int skill2()
    {
      return self()->mSkill2;
    }

    /**
      Set Pause before each computer move.
    */
    static
    void setPauseForComputer( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "PauseForComputer" ) ))
        self()->mPauseForComputer = v;
    }

    /**
      Get Pause before each computer move.
    */
    static
    bool pauseForComputer()
    {
      return self()->mPauseForComputer;
    }


    /**
      Get Pause before each cascade step.
    */
    static
    bool pauseForStep()
    {
      return self()->mPauseForStep;
    }

  protected:
    Prefs();
    friend class PrefsHelper;


    // Game
    int mAnimationSpeed;
    bool mAnimationNone;
    bool mAnimationDelay;
    bool mAnimationBlink;
    bool mAnimationSpread;
    QColor mColor0;
    QColor mColor1;
    QColor mColor2;
    int mCubeDim;
    bool mComputerPlayer1;
    bool mKepler1;
    bool mNewton1;
    int mSkill1;
    bool mComputerPlayer2;
    bool mKepler2;
    bool mNewton2;
    int mSkill2;
    bool mPauseForComputer;
    bool mPauseForStep;

  private:
};

#endif

