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

    /**
      Set Wait time:
    */
    static
    void setWaitTime( uint v )
    {

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

      if (!self()->isWaitTimeImmutable())
        self()->mWaitTime = v;
    }

    /**
      Get Wait time:
    */
    static
    uint waitTime()
    {
      return self()->mWaitTime;
    }

    /**
      Is Wait time: Immutable
    */
    static
    bool isWaitTimeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "WaitTime" ) );
    }

    /**
      Get Item object corresponding to WaitTime()
    */
    ItemUInt *waitTimeItem()
    {
      return mWaitTimeItem;
    }

    /**
      Set Do not use proxy
    */
    static
    void setNoProxy( bool v )
    {
      if (!self()->isNoProxyImmutable())
        self()->mNoProxy = v;
    }

    /**
      Get Do not use proxy
    */
    static
    bool noProxy()
    {
      return self()->mNoProxy;
    }

    /**
      Is Do not use proxy Immutable
    */
    static
    bool isNoProxyImmutable()
    {
      return self()->isImmutable( QStringLiteral( "NoProxy" ) );
    }

    /**
      Get Item object corresponding to NoProxy()
    */
    ItemBool *noProxyItem()
    {
      return mNoProxyItem;
    }

    /**
      Set Randomise wait time
    */
    static
    void setRandomWait( bool v )
    {
      if (!self()->isRandomWaitImmutable())
        self()->mRandomWait = v;
    }

    /**
      Get Randomise wait time
    */
    static
    bool randomWait()
    {
      return self()->mRandomWait;
    }

    /**
      Is Randomise wait time Immutable
    */
    static
    bool isRandomWaitImmutable()
    {
      return self()->isImmutable( QStringLiteral( "RandomWait" ) );
    }

    /**
      Get Item object corresponding to RandomWait()
    */
    ItemBool *randomWaitItem()
    {
      return mRandomWaitItem;
    }

    /**
      Set Save in standard web archive format
    */
    static
    void setFixExtensions( bool v )
    {
      if (!self()->isFixExtensionsImmutable())
        self()->mFixExtensions = v;
    }

    /**
      Get Save in standard web archive format
    */
    static
    bool fixExtensions()
    {
      return self()->mFixExtensions;
    }

    /**
      Is Save in standard web archive format Immutable
    */
    static
    bool isFixExtensionsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "FixExtensions" ) );
    }

    /**
      Get Item object corresponding to FixExtensions()
    */
    ItemBool *fixExtensionsItem()
    {
      return mFixExtensionsItem;
    }

    /**
      Set Run in terminal
    */
    static
    void setRunInTerminal( bool v )
    {
      if (!self()->isRunInTerminalImmutable())
        self()->mRunInTerminal = v;
    }

    /**
      Get Run in terminal
    */
    static
    bool runInTerminal()
    {
      return self()->mRunInTerminal;
    }

    /**
      Is Run in terminal Immutable
    */
    static
    bool isRunInTerminalImmutable()
    {
      return self()->isImmutable( QStringLiteral( "RunInTerminal" ) );
    }

    /**
      Get Item object corresponding to RunInTerminal()
    */
    ItemBool *runInTerminalItem()
    {
      return mRunInTerminalItem;
    }

    /**
      Set Close when finished
    */
    static
    void setCloseWhenFinished( bool v )
    {
      if (!self()->isCloseWhenFinishedImmutable())
        self()->mCloseWhenFinished = v;
    }

    /**
      Get Close when finished
    */
    static
    bool closeWhenFinished()
    {
      return self()->mCloseWhenFinished;
    }

    /**
      Is Close when finished Immutable
    */
    static
    bool isCloseWhenFinishedImmutable()
    {
      return self()->isImmutable( QStringLiteral( "CloseWhenFinished" ) );
    }

    /**
      Get Item object corresponding to CloseWhenFinished()
    */
    ItemBool *closeWhenFinishedItem()
    {
      return mCloseWhenFinishedItem;
    }

    /**
      Set Archive &type:
    */
    static
    void setArchiveType( const QString & v )
    {
      if (!self()->isArchiveTypeImmutable())
        self()->mArchiveType = v;
    }

    /**
      Get Archive &type:
    */
    static
    QString archiveType()
    {
      return self()->mArchiveType;
    }

    /**
      Is Archive &type: Immutable
    */
    static
    bool isArchiveTypeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ArchiveType" ) );
    }

    /**
      Get Item object corresponding to ArchiveType()
    */
    ItemString *archiveTypeItem()
    {
      return mArchiveTypeItem;
    }

  protected:
    Settings();
    friend class SettingsHelper;


    // Options
    uint mWaitTime;
    bool mNoProxy;
    bool mRandomWait;
    bool mFixExtensions;
    bool mRunInTerminal;
    bool mCloseWhenFinished;
    QString mArchiveType;

  private:
    ItemUInt *mWaitTimeItem;
    ItemBool *mNoProxyItem;
    ItemBool *mRandomWaitItem;
    ItemBool *mFixExtensionsItem;
    ItemBool *mRunInTerminalItem;
    ItemBool *mCloseWhenFinishedItem;
    ItemString *mArchiveTypeItem;
};

#endif

