// This file is generated by kconfig_compiler_kf6 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() override;

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

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

    /**
      Is Use rich log text Immutable
    */
    static
    bool isUseRichTextImmutable()
    {
      return self()->isImmutable( QStringLiteral( "useRichText" ) );
    }

    /**
      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()->isLogWidgetPositionImmutable())
        self()->mLogWidgetPosition = v;
    }

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

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

    /**
      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()->isMaxBlockCountImmutable())
        self()->mMaxBlockCount = v;
    }

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

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

  protected:
    LogViewerPluginSettings();
    friend class LogViewerPluginSettingsHelper;


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

#endif

