QTfrontend/databrowser.h
author nemo
Sun, 04 Sep 2011 12:34:43 -0400
changeset 5766 ca9c7551bc8a
parent 5755 a079b4dea081
child 5780 528dd4a14861
permissions -rw-r--r--
oops
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5755
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
     1
#ifndef DATABROWSER_H
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
     2
#define DATABROWSER_H
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
     3
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
     4
#include <QTextBrowser>
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
     5
#include <QSet>
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
     6
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
     7
class QNetworkAccessManager;
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
     8
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
     9
class DataBrowser : public QTextBrowser
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    10
{
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    11
    Q_OBJECT
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    12
public:
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    13
    explicit DataBrowser(QWidget *parent = 0);
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    14
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    15
signals:
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    16
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    17
public slots:
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    18
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    19
private:
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    20
    QNetworkAccessManager *manager;
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    21
    QHash<QUrl, QByteArray> resources;
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    22
    QSet<QUrl> requestedResources;
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    23
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    24
    QVariant loadResource(int type, const QUrl & name);
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    25
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    26
private slots:
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    27
    void resourceDownloaded();
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    28
};
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    29
a079b4dea081 Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
diff changeset
    30
#endif // DATABROWSER_H