equal
deleted
inserted
replaced
1 #ifndef DATABROWSER_H |
|
2 #define DATABROWSER_H |
|
3 |
|
4 #include <QTextBrowser> |
|
5 #include <QSet> |
|
6 |
|
7 class QNetworkAccessManager; |
|
8 |
|
9 class DataBrowser : public QTextBrowser |
|
10 { |
|
11 Q_OBJECT |
|
12 public: |
|
13 explicit DataBrowser(QWidget *parent = 0); |
|
14 |
|
15 signals: |
|
16 |
|
17 public slots: |
|
18 |
|
19 private: |
|
20 QNetworkAccessManager *manager; |
|
21 |
|
22 // hash and set of QString instead of QUrl to support Qt versions |
|
23 // older than 4.7 (those have no support for qHash(const QUrl &)) |
|
24 QHash<QString, QByteArray> resources; |
|
25 QSet<QString> requestedResources; |
|
26 |
|
27 QVariant loadResource(int type, const QUrl & name); |
|
28 |
|
29 private slots: |
|
30 void resourceDownloaded(); |
|
31 }; |
|
32 |
|
33 #endif // DATABROWSER_H |
|