Changeset View
Changeset View
Standalone View
Standalone View
src/InfoData.h
1 | #ifndef INFODATA_H | 1 | #ifndef INFODATA_H | ||
---|---|---|---|---|---|
2 | #define INFODATA_H | 2 | #define INFODATA_H | ||
3 | 3 | | |||
4 | #include <QObject> | 4 | #include <QObject> | ||
5 | #include <QString> | 5 | #include <QString> | ||
6 | #include <QVariantMap> | 6 | #include <QVariantMap> | ||
7 | 7 | | |||
8 | class InfoData : public QObject | 8 | class InfoData : public QObject | ||
9 | { | 9 | { | ||
10 | Q_OBJECT | 10 | Q_OBJECT | ||
11 | 11 | | |||
12 | Q_PROPERTY(QString component READ component WRITE setComponent NOTIFY componentChanged) | 12 | Q_PROPERTY(QString component READ component WRITE setComponent NOTIFY componentChanged) | ||
13 | Q_PROPERTY(QString higUrl READ higUrl NOTIFY higUrlChanged) | 13 | Q_PROPERTY(QString higUrl READ higUrl NOTIFY higUrlChanged) | ||
14 | Q_PROPERTY(QString sourceUrl READ sourceUrl NOTIFY sourceUrlChanged) | 14 | Q_PROPERTY(QString sourceUrl READ sourceUrl NOTIFY sourceUrlChanged) | ||
15 | Q_PROPERTY(QString apiUrl READ apiUrl NOTIFY apiUrlChanged) | ||||
15 | Q_PROPERTY(QString title READ title NOTIFY titleChanged) | 16 | Q_PROPERTY(QString title READ title NOTIFY titleChanged) | ||
16 | Q_PROPERTY(QString text READ text NOTIFY textChanged) | 17 | Q_PROPERTY(QString text READ text NOTIFY textChanged) | ||
17 | 18 | | |||
18 | public: | 19 | public: | ||
19 | InfoData(QObject *parent=0); | 20 | InfoData(QObject *parent=0); | ||
20 | 21 | | |||
21 | QString component() const; | 22 | QString component() const; | ||
22 | QString higUrl() const; | 23 | QString higUrl() const; | ||
23 | QString sourceUrl() const; | 24 | QString sourceUrl() const; | ||
25 | QString apiUrl() const; | ||||
24 | QString title() const; | 26 | QString title() const; | ||
25 | QString text() const; | 27 | QString text() const; | ||
26 | 28 | | |||
27 | void setComponent(const QString &componentName); | 29 | void setComponent(const QString &componentName); | ||
28 | 30 | | |||
29 | signals: | 31 | signals: | ||
30 | void componentChanged(); | 32 | void componentChanged(); | ||
31 | void higUrlChanged(); | 33 | void higUrlChanged(); | ||
32 | void sourceUrlChanged(); | 34 | void sourceUrlChanged(); | ||
35 | void apiUrlChanged(); | ||||
33 | void titleChanged(); | 36 | void titleChanged(); | ||
34 | void textChanged(); | 37 | void textChanged(); | ||
35 | 38 | | |||
36 | private: | 39 | private: | ||
37 | void setComponentData(); | 40 | void setComponentData(); | ||
38 | void clearComponentData(); | 41 | void clearComponentData(); | ||
39 | 42 | | |||
40 | QString m_component; | 43 | QString m_component; | ||
41 | QString m_higUrl; | 44 | QString m_higUrl; | ||
42 | QString m_sourceUrl; | 45 | QString m_sourceUrl; | ||
46 | QString m_apiUrl; | ||||
43 | QString m_title; | 47 | QString m_title; | ||
44 | QString m_text; | 48 | QString m_text; | ||
45 | QVariantMap m_jsonMap; | 49 | QVariantMap m_jsonMap; | ||
46 | }; | 50 | }; | ||
47 | 51 | | |||
48 | #endif // INFODATA_H | 52 | #endif // INFODATA_H |