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

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

class FileReceiverSettings : public KConfigSkeleton
{
  Q_OBJECT
  public:

    static FileReceiverSettings *self();
    ~FileReceiverSettings() override;

    /**
      Set Save received files to:
    */
    static
    void setSaveUrl( const QUrl & v )
    {
      if (v != self()->mSaveUrl && !self()->isSaveUrlImmutable()) {
        self()->mSaveUrl = v;
        Q_EMIT self()->saveUrlChanged();
      }
    }

    Q_PROPERTY(QUrl saveUrl READ saveUrl WRITE setSaveUrl NOTIFY saveUrlChanged)
    Q_PROPERTY(bool isSaveUrlImmutable READ isSaveUrlImmutable CONSTANT)
    /**
      Get Save received files to:
    */
    static
    QUrl saveUrl()
    {
      return self()->mSaveUrl;
    }

    /**
      Is Save received files to: Immutable
    */
    static
    bool isSaveUrlImmutable()
    {
      return self()->isImmutable( QStringLiteral( "saveUrl" ) );
    }

    /**
      Set Whether allow to modify shared files
    */
    static
    void setAutoAccept( int v )
    {
      if (v != self()->mAutoAccept && !self()->isAutoAcceptImmutable()) {
        self()->mAutoAccept = v;
        Q_EMIT self()->autoAcceptChanged();
      }
    }

    Q_PROPERTY(int autoAccept READ autoAccept WRITE setAutoAccept NOTIFY autoAcceptChanged)
    Q_PROPERTY(bool isAutoAcceptImmutable READ isAutoAcceptImmutable CONSTANT)
    /**
      Get Whether allow to modify shared files
    */
    static
    int autoAccept()
    {
      return self()->mAutoAccept;
    }

    /**
      Is Whether allow to modify shared files Immutable
    */
    static
    bool isAutoAcceptImmutable()
    {
      return self()->isImmutable( QStringLiteral( "autoAccept" ) );
    }


    enum {
      signalSaveUrlChanged = 1,
      signalAutoAcceptChanged = 2
    };

  Q_SIGNALS:
    void saveUrlChanged();

    void autoAcceptChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    FileReceiverSettings();
    friend class FileReceiverSettingsHelper;


    // General
    QUrl mSaveUrl;
    int mAutoAccept;
};

#endif

