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

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

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

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

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

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

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

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

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

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

  protected:
    Settings();
    friend class SettingsHelper;


    // General
    bool mUseQuestionMarks;

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

  private:
};

#endif

