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

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

class IPBlockingPluginSettings : public KConfigSkeleton
{
  public:

    static IPBlockingPluginSettings *self();
    ~IPBlockingPluginSettings();

    /**
      Set Level1 filter url
    */
    static
    void setFilterURL( const QUrl & v )
    {
      if (!self()->isImmutable( QStringLiteral( "filterURL" ) ))
        self()->mFilterURL = v;
    }

    /**
      Get Level1 filter url
    */
    static
    QUrl filterURL()
    {
      return self()->mFilterURL;
    }

    /**
      Set Use level1 filter?
    */
    static
    void setUseLevel1( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "useLevel1" ) ))
        self()->mUseLevel1 = v;
    }

    /**
      Get Use level1 filter?
    */
    static
    bool useLevel1()
    {
      return self()->mUseLevel1;
    }

    /**
      Set autoUpdate
    */
    static
    void setAutoUpdate( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "autoUpdate" ) ))
        self()->mAutoUpdate = v;
    }

    /**
      Get autoUpdate
    */
    static
    bool autoUpdate()
    {
      return self()->mAutoUpdate;
    }

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

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

      if (!self()->isImmutable( QStringLiteral( "autoUpdateInterval" ) ))
        self()->mAutoUpdateInterval = v;
    }

    /**
      Get autoUpdateInterval
    */
    static
    int autoUpdateInterval()
    {
      return self()->mAutoUpdateInterval;
    }

  protected:
    IPBlockingPluginSettings();
    friend class IPBlockingPluginSettingsHelper;


    // general
    QUrl mFilterURL;
    bool mUseLevel1;
    bool mAutoUpdate;
    int mAutoUpdateInterval;

  private:
};

#endif

