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 apiUrl READ apiUrl NOTIFY apiUrlChanged)
16     Q_PROPERTY(QString title READ title NOTIFY titleChanged)
17     Q_PROPERTY(QString text READ text NOTIFY textChanged)
18 
19 public:
20     InfoData(QObject *parent=0);
21 
22     QString component() const;
23     QString higUrl() const;
24     QString sourceUrl() const;
25     QString apiUrl() const;
26     QString title() const;
27     QString text() const;
28 
29     void setComponent(const QString &componentName);
30 
31 signals:
32     void componentChanged();
33     void higUrlChanged();
34     void sourceUrlChanged();
35     void apiUrlChanged();
36     void titleChanged();
37     void textChanged();
38 
39 private:
40     void setComponentData();
41     void clearComponentData();
42 
43     QString m_component;
44     QString m_higUrl;
45     QString m_sourceUrl;
46     QString m_apiUrl;
47     QString m_title;
48     QString m_text;
49     QVariantMap m_jsonMap;
50 };
51 
52 #endif // INFODATA_H
53