| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <aleixpol@kde.org> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.0-or-later |
| 5 | */ |
| 6 | |
| 7 | #ifndef REVIEWBOARDRC_H |
| 8 | #define REVIEWBOARDRC_H |
| 9 | |
| 10 | #include <QJsonObject> |
| 11 | #include <QObject> |
| 12 | #include <QUrl> |
| 13 | |
| 14 | class ReviewboardRC : public QObject |
| 15 | { |
| 16 | Q_OBJECT |
| 17 | Q_PROPERTY(QUrl path READ path WRITE setPath) |
| 18 | Q_PROPERTY(QUrl server READ server NOTIFY dataChanged) |
| 19 | Q_PROPERTY(QString repository READ repository NOTIFY dataChanged) |
| 20 | Q_PROPERTY(QJsonObject extraData READ extraData NOTIFY dataChanged) |
| 21 | public: |
| 22 | ReviewboardRC(QObject *parent = nullptr); |
| 23 | |
| 24 | void setPath(const QUrl &path); |
| 25 | |
| 26 | QUrl path() const |
| 27 | { |
| 28 | return m_path; |
| 29 | } |
| 30 | QUrl server() const |
| 31 | { |
| 32 | return m_server; |
| 33 | } |
| 34 | QString repository() const |
| 35 | { |
| 36 | return m_repository; |
| 37 | } |
| 38 | QJsonObject () const |
| 39 | { |
| 40 | return m_extraData; |
| 41 | } |
| 42 | |
| 43 | Q_SIGNALS: |
| 44 | void dataChanged(); |
| 45 | |
| 46 | private: |
| 47 | void (const QString &key, const QString &value); |
| 48 | |
| 49 | QUrl m_path; |
| 50 | QUrl m_server; |
| 51 | QString m_repository; |
| 52 | QJsonObject ; |
| 53 | }; |
| 54 | |
| 55 | #endif |
| 56 | |