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

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

class LogViewerPluginSettings : public KConfigSkeleton
{
  public:

    static LogViewerPluginSettings *self();
    ~LogViewerPluginSettings();

    /**
      Set Use rich log text
    */
    static
    void setUseRichText( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "useRichText" ) ))
        self()->mUseRichText = v;
    }

    /**
      Get Use rich log text
    */
    static
    bool useRichText()
    {
      return self()->mUseRichText;
    }

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

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

      if (!self()->isImmutable( QStringLiteral( "logWidgetPosition" ) ))
        self()->mLogWidgetPosition = v;
    }

    /**
      Get logWidgetPosition
    */
    static
    int logWidgetPosition()
    {
      return self()->mLogWidgetPosition;
    }

    /**
      Set maxBlockCount
    */
    static
    void setMaxBlockCount( int v )
    {
      if (v < 50)
      {
        qDebug() << "setMaxBlockCount: value " << v << " is less than the minimum value of 50";
        v = 50;
      }

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

      if (!self()->isImmutable( QStringLiteral( "maxBlockCount" ) ))
        self()->mMaxBlockCount = v;
    }

    /**
      Get maxBlockCount
    */
    static
    int maxBlockCount()
    {
      return self()->mMaxBlockCount;
    }

  protected:
    LogViewerPluginSettings();
    friend class LogViewerPluginSettingsHelper;


    // general
    bool mUseRichText;
    int mLogWidgetPosition;
    int mMaxBlockCount;

  private:
};

#endif

