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