File indexing completed on 2024-12-22 03:48:44
0001 /* 0002 SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <aleixpol@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef REVIEWBOARDRC_H 0008 #define REVIEWBOARDRC_H 0009 0010 #include <QJsonObject> 0011 #include <QObject> 0012 #include <QUrl> 0013 0014 class ReviewboardRC : public QObject 0015 { 0016 Q_OBJECT 0017 Q_PROPERTY(QUrl path READ path WRITE setPath) 0018 Q_PROPERTY(QUrl server READ server NOTIFY dataChanged) 0019 Q_PROPERTY(QString repository READ repository NOTIFY dataChanged) 0020 Q_PROPERTY(QJsonObject extraData READ extraData NOTIFY dataChanged) 0021 public: 0022 ReviewboardRC(QObject *parent = nullptr); 0023 0024 void setPath(const QUrl &path); 0025 0026 QUrl path() const 0027 { 0028 return m_path; 0029 } 0030 QUrl server() const 0031 { 0032 return m_server; 0033 } 0034 QString repository() const 0035 { 0036 return m_repository; 0037 } 0038 QJsonObject extraData() const 0039 { 0040 return m_extraData; 0041 } 0042 0043 Q_SIGNALS: 0044 void dataChanged(); 0045 0046 private: 0047 void addExtraData(const QString &key, const QString &value); 0048 0049 QUrl m_path; 0050 QUrl m_server; 0051 QString m_repository; 0052 QJsonObject m_extraData; 0053 }; 0054 0055 #endif