// This file is generated by kconfig_compiler_kf6 from config.kcfg.
// All changes you do to this file will be lost.
#ifndef SETTINGS_H
#define SETTINGS_H

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

class Settings : public KConfigSkeleton
{
  Q_OBJECT
  QML_ELEMENT
  public:
    enum EnumPreferredVideoQuality { Q2160, Q1440, Q1080, Q720, Q480, Q360, Q240, Q144 };
    Q_ENUM(EnumPreferredVideoQuality)
    enum EnumProxyType { System, HTTP };
    Q_ENUM(EnumProxyType)

    Settings( KSharedConfig::Ptr config = KSharedConfig::openConfig(), QObject *parent = nullptr );
    ~Settings() override;

    /**
      Set HideShorts
    */
    void setHideShorts( bool v )
    {
      if (v != mHideShorts && !isHideShortsImmutable()) {
        mHideShorts = v;
        Q_EMIT HideShortsChanged();
      }
    }

    Q_PROPERTY(bool hideShorts READ hideShorts WRITE setHideShorts NOTIFY HideShortsChanged)
    Q_PROPERTY(bool isHideShortsImmutable READ isHideShortsImmutable CONSTANT)
    Q_PROPERTY(bool defaultHideShortsValue READ defaultHideShortsValue CONSTANT)
    /**
      Get HideShorts
    */
    bool hideShorts() const
    {
      return mHideShorts;
    }

    /**
      Is HideShorts Immutable
    */
    bool isHideShortsImmutable() const
    {
      return isImmutable( QStringLiteral( "HideShorts" ) );
    }

    /**
      Get HideShorts default value
    */
    bool defaultHideShortsValue() const
    {
        return defaultHideShortsValue_helper();
    }

    /**
      Set UseSponsorBlock
    */
    void setUseSponsorBlock( bool v )
    {
      if (v != mUseSponsorBlock && !isUseSponsorBlockImmutable()) {
        mUseSponsorBlock = v;
        Q_EMIT UseSponsorBlockChanged();
      }
    }

    Q_PROPERTY(bool useSponsorBlock READ useSponsorBlock WRITE setUseSponsorBlock NOTIFY UseSponsorBlockChanged)
    Q_PROPERTY(bool isUseSponsorBlockImmutable READ isUseSponsorBlockImmutable CONSTANT)
    Q_PROPERTY(bool defaultUseSponsorBlockValue READ defaultUseSponsorBlockValue CONSTANT)
    /**
      Get UseSponsorBlock
    */
    bool useSponsorBlock() const
    {
      return mUseSponsorBlock;
    }

    /**
      Is UseSponsorBlock Immutable
    */
    bool isUseSponsorBlockImmutable() const
    {
      return isImmutable( QStringLiteral( "UseSponsorBlock" ) );
    }

    /**
      Get UseSponsorBlock default value
    */
    bool defaultUseSponsorBlockValue() const
    {
        return defaultUseSponsorBlockValue_helper();
    }

    /**
      Set SkipSponsorBlock
    */
    void setSkipSponsorBlock( bool v )
    {
      if (v != mSkipSponsorBlock && !isSkipSponsorBlockImmutable()) {
        mSkipSponsorBlock = v;
        Q_EMIT SkipSponsorBlockChanged();
      }
    }

    Q_PROPERTY(bool skipSponsorBlock READ skipSponsorBlock WRITE setSkipSponsorBlock NOTIFY SkipSponsorBlockChanged)
    Q_PROPERTY(bool isSkipSponsorBlockImmutable READ isSkipSponsorBlockImmutable CONSTANT)
    Q_PROPERTY(bool defaultSkipSponsorBlockValue READ defaultSkipSponsorBlockValue CONSTANT)
    /**
      Get SkipSponsorBlock
    */
    bool skipSponsorBlock() const
    {
      return mSkipSponsorBlock;
    }

    /**
      Is SkipSponsorBlock Immutable
    */
    bool isSkipSponsorBlockImmutable() const
    {
      return isImmutable( QStringLiteral( "SkipSponsorBlock" ) );
    }

    /**
      Get SkipSponsorBlock default value
    */
    bool defaultSkipSponsorBlockValue() const
    {
        return defaultSkipSponsorBlockValue_helper();
    }

    /**
      Set PreferredVideoQuality
    */
    void setPreferredVideoQuality( int v )
    {
      if (v != mPreferredVideoQuality && !isPreferredVideoQualityImmutable()) {
        mPreferredVideoQuality = v;
        Q_EMIT PreferredVideoQualityChanged();
      }
    }

    Q_PROPERTY(int preferredVideoQuality READ preferredVideoQuality WRITE setPreferredVideoQuality NOTIFY PreferredVideoQualityChanged)
    Q_PROPERTY(bool isPreferredVideoQualityImmutable READ isPreferredVideoQualityImmutable CONSTANT)
    Q_PROPERTY(int defaultPreferredVideoQualityValue READ defaultPreferredVideoQualityValue CONSTANT)
    /**
      Get PreferredVideoQuality
    */
    int preferredVideoQuality() const
    {
      return mPreferredVideoQuality;
    }

    /**
      Is PreferredVideoQuality Immutable
    */
    bool isPreferredVideoQualityImmutable() const
    {
      return isImmutable( QStringLiteral( "PreferredVideoQuality" ) );
    }

    /**
      Get PreferredVideoQuality default value
    */
    int defaultPreferredVideoQualityValue() const
    {
        return defaultPreferredVideoQualityValue_helper();
    }

    /**
      Set SponsorBlockServer
    */
    void setSponsorBlockServer( const QString & v )
    {
      if (v != mSponsorBlockServer && !isSponsorBlockServerImmutable()) {
        mSponsorBlockServer = v;
        Q_EMIT SponsorBlockServerChanged();
      }
    }

    Q_PROPERTY(QString sponsorBlockServer READ sponsorBlockServer WRITE setSponsorBlockServer NOTIFY SponsorBlockServerChanged)
    Q_PROPERTY(bool isSponsorBlockServerImmutable READ isSponsorBlockServerImmutable CONSTANT)
    Q_PROPERTY(QString defaultSponsorBlockServerValue READ defaultSponsorBlockServerValue CONSTANT)
    /**
      Get SponsorBlockServer
    */
    QString sponsorBlockServer() const
    {
      return mSponsorBlockServer;
    }

    /**
      Is SponsorBlockServer Immutable
    */
    bool isSponsorBlockServerImmutable() const
    {
      return isImmutable( QStringLiteral( "SponsorBlockServer" ) );
    }

    /**
      Get SponsorBlockServer default value
    */
    QString defaultSponsorBlockServerValue() const
    {
        return defaultSponsorBlockServerValue_helper();
    }

    /**
      Set The type of proxy used by the application.
    */
    void setProxyType( int v )
    {
      if (v != mProxyType && !isProxyTypeImmutable()) {
        mProxyType = v;
        Q_EMIT ProxyTypeChanged();
      }
    }

    Q_PROPERTY(int proxyType READ proxyType WRITE setProxyType NOTIFY ProxyTypeChanged)
    Q_PROPERTY(bool isProxyTypeImmutable READ isProxyTypeImmutable CONSTANT)
    Q_PROPERTY(int defaultProxyTypeValue READ defaultProxyTypeValue CONSTANT)
    /**
      Get The type of proxy used by the application.
    */
    int proxyType() const
    {
      return mProxyType;
    }

    /**
      Is The type of proxy used by the application. Immutable
    */
    bool isProxyTypeImmutable() const
    {
      return isImmutable( QStringLiteral( "ProxyType" ) );
    }

    /**
      Get The type of proxy used by the application. default value
    */
    int defaultProxyTypeValue() const
    {
        return defaultProxyTypeValue_helper();
    }

    /**
      Set IP or hostname of the proxy
    */
    void setProxyHost( const QString & v )
    {
      if (v != mProxyHost && !isProxyHostImmutable()) {
        mProxyHost = v;
        Q_EMIT ProxyHostChanged();
      }
    }

    Q_PROPERTY(QString proxyHost READ proxyHost WRITE setProxyHost NOTIFY ProxyHostChanged)
    Q_PROPERTY(bool isProxyHostImmutable READ isProxyHostImmutable CONSTANT)
    Q_PROPERTY(QString defaultProxyHostValue READ defaultProxyHostValue CONSTANT)
    /**
      Get IP or hostname of the proxy
    */
    QString proxyHost() const
    {
      return mProxyHost;
    }

    /**
      Is IP or hostname of the proxy Immutable
    */
    bool isProxyHostImmutable() const
    {
      return isImmutable( QStringLiteral( "ProxyHost" ) );
    }

    /**
      Get IP or hostname of the proxy default value
    */
    QString defaultProxyHostValue() const
    {
        return defaultProxyHostValue_helper();
    }

    /**
      Set The port number of the proxy
    */
    void setProxyPort( int v )
    {
      if (v != mProxyPort && !isProxyPortImmutable()) {
        mProxyPort = v;
        Q_EMIT ProxyPortChanged();
      }
    }

    Q_PROPERTY(int proxyPort READ proxyPort WRITE setProxyPort NOTIFY ProxyPortChanged)
    Q_PROPERTY(bool isProxyPortImmutable READ isProxyPortImmutable CONSTANT)
    Q_PROPERTY(int defaultProxyPortValue READ defaultProxyPortValue CONSTANT)
    /**
      Get The port number of the proxy
    */
    int proxyPort() const
    {
      return mProxyPort;
    }

    /**
      Is The port number of the proxy Immutable
    */
    bool isProxyPortImmutable() const
    {
      return isImmutable( QStringLiteral( "ProxyPort" ) );
    }

    /**
      Get The port number of the proxy default value
    */
    int defaultProxyPortValue() const
    {
        return defaultProxyPortValue_helper();
    }

    /**
      Set The user of the proxy
    */
    void setProxyUser( const QString & v )
    {
      if (v != mProxyUser && !isProxyUserImmutable()) {
        mProxyUser = v;
        Q_EMIT ProxyUserChanged();
      }
    }

    Q_PROPERTY(QString proxyUser READ proxyUser WRITE setProxyUser NOTIFY ProxyUserChanged)
    Q_PROPERTY(bool isProxyUserImmutable READ isProxyUserImmutable CONSTANT)
    /**
      Get The user of the proxy
    */
    QString proxyUser() const
    {
      return mProxyUser;
    }

    /**
      Is The user of the proxy Immutable
    */
    bool isProxyUserImmutable() const
    {
      return isImmutable( QStringLiteral( "ProxyUser" ) );
    }

    /**
      Set The password of the proxy
    */
    void setProxyPassword( const QString & v )
    {
      if (v != mProxyPassword && !isProxyPasswordImmutable()) {
        mProxyPassword = v;
        Q_EMIT ProxyPasswordChanged();
      }
    }

    Q_PROPERTY(QString proxyPassword READ proxyPassword WRITE setProxyPassword NOTIFY ProxyPasswordChanged)
    Q_PROPERTY(bool isProxyPasswordImmutable READ isProxyPasswordImmutable CONSTANT)
    /**
      Get The password of the proxy
    */
    QString proxyPassword() const
    {
      return mProxyPassword;
    }

    /**
      Is The password of the proxy Immutable
    */
    bool isProxyPasswordImmutable() const
    {
      return isImmutable( QStringLiteral( "ProxyPassword" ) );
    }


    enum {
      signalHideShortsChanged = 1,
      signalUseSponsorBlockChanged = 2,
      signalSkipSponsorBlockChanged = 3,
      signalPreferredVideoQualityChanged = 4,
      signalSponsorBlockServerChanged = 5,
      signalProxyTypeChanged = 6,
      signalProxyHostChanged = 7,
      signalProxyPortChanged = 8,
      signalProxyUserChanged = 9,
      signalProxyPasswordChanged = 10
    };

  Q_SIGNALS:
    void HideShortsChanged();

    void UseSponsorBlockChanged();

    void SkipSponsorBlockChanged();

    void PreferredVideoQualityChanged();

    void SponsorBlockServerChanged();

    void ProxyTypeChanged();

    void ProxyHostChanged();

    void ProxyPortChanged();

    void ProxyUserChanged();

    void ProxyPasswordChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:

    // General
    bool mHideShorts;
    bool defaultHideShortsValue_helper() const;
    bool mUseSponsorBlock;
    bool defaultUseSponsorBlockValue_helper() const;
    bool mSkipSponsorBlock;
    bool defaultSkipSponsorBlockValue_helper() const;
    int mPreferredVideoQuality;
    int defaultPreferredVideoQualityValue_helper() const;

    // Developer
    QString mSponsorBlockServer;
    QString defaultSponsorBlockServerValue_helper() const;

    // NetworkProxy
    int mProxyType;
    int defaultProxyTypeValue_helper() const;
    QString mProxyHost;
    QString defaultProxyHostValue_helper() const;
    int mProxyPort;
    int defaultProxyPortValue_helper() const;
    QString mProxyUser;
    QString defaultProxyUserValue_helper() const;
    QString mProxyPassword;
    QString defaultProxyPasswordValue_helper() const;
};

#endif

