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

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

class SourceConfig : public KConfigSkeleton
{
  Q_OBJECT
  public:
    class EnumType
    {
      public:
      enum type { Invidious, PeerTube, Piped, COUNT };
    };

    SourceConfig( const QString & uuid, QObject *parent = nullptr );
    ~SourceConfig() override;

    /**
      Set url
    */
    void setUrl( const QString & v )
    {
      if (v != mUrl && !isUrlImmutable()) {
        mUrl = v;
        Q_EMIT urlChanged();
      }
    }

    Q_PROPERTY(QString url READ url WRITE setUrl NOTIFY urlChanged)
    Q_PROPERTY(bool isUrlImmutable READ isUrlImmutable CONSTANT)
    /**
      Get url
    */
    QString url() const
    {
      return mUrl;
    }

    /**
      Is url Immutable
    */
    bool isUrlImmutable() const
    {
      return isImmutable( QStringLiteral( "url" ) );
    }

    /**
      Set protocol
    */
    void setProtocol( const QString & v )
    {
      if (v != mProtocol && !isProtocolImmutable()) {
        mProtocol = v;
        Q_EMIT protocolChanged();
      }
    }

    Q_PROPERTY(QString protocol READ protocol WRITE setProtocol NOTIFY protocolChanged)
    Q_PROPERTY(bool isProtocolImmutable READ isProtocolImmutable CONSTANT)
    Q_PROPERTY(QString defaultProtocolValue READ defaultProtocolValue CONSTANT)
    /**
      Get protocol
    */
    QString protocol() const
    {
      return mProtocol;
    }

    /**
      Is protocol Immutable
    */
    bool isProtocolImmutable() const
    {
      return isImmutable( QStringLiteral( "protocol" ) );
    }

    /**
      Get protocol default value
    */
    QString defaultProtocolValue() const
    {
        return defaultProtocolValue_helper();
    }

    /**
      Set type
    */
    void setType( int v )
    {
      if (v != mType && !isTypeImmutable()) {
        mType = v;
        Q_EMIT typeChanged();
      }
    }

    Q_PROPERTY(int type READ type WRITE setType NOTIFY typeChanged)
    Q_PROPERTY(bool isTypeImmutable READ isTypeImmutable CONSTANT)
    /**
      Get type
    */
    int type() const
    {
      return mType;
    }

    /**
      Is type Immutable
    */
    bool isTypeImmutable() const
    {
      return isImmutable( QStringLiteral( "type" ) );
    }

    /**
      Set username
    */
    void setUsername( const QString & v )
    {
      if (v != mUsername && !isUsernameImmutable()) {
        mUsername = v;
        Q_EMIT usernameChanged();
      }
    }

    Q_PROPERTY(QString username READ username WRITE setUsername NOTIFY usernameChanged)
    Q_PROPERTY(bool isUsernameImmutable READ isUsernameImmutable CONSTANT)
    /**
      Get username
    */
    QString username() const
    {
      return mUsername;
    }

    /**
      Is username Immutable
    */
    bool isUsernameImmutable() const
    {
      return isImmutable( QStringLiteral( "username" ) );
    }


    enum {
      signalUrlChanged = 1,
      signalProtocolChanged = 2,
      signalTypeChanged = 3,
      signalUsernameChanged = 4
    };

  Q_SIGNALS:
    void urlChanged();

    void protocolChanged();

    void typeChanged();

    void usernameChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    QString mParamuuid;

    // source-$(uuid)
    QString mUrl;
    QString defaultUrlValue_helper() const;
    QString mProtocol;
    QString defaultProtocolValue_helper() const;
    int mType;
    int defaultTypeValue_helper() const;
    QString mUsername;
    QString defaultUsernameValue_helper() const;
};

#endif

