~ubuntu-branches/ubuntu/utopic/hedgewars/utopic

« back to all changes in this revision

Viewing changes to QTfrontend/databrowser.h

  • Committer: Package Import Robot
  • Author(s): Dmitry E. Oboukhov
  • Date: 2011-09-23 10:16:55 UTC
  • mto: (19.1.2 sid) (1.3.1) (21.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: package-import@ubuntu.com-20110923101655-yrajfbj5b0v4asbt
Tags: upstream-0.9.16
ImportĀ upstreamĀ versionĀ 0.9.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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