summaryrefslogtreecommitdiffstats
path: root/src/fbbrowser.h
blob: 6cfa588cb34c4ecb4ad23497f70b7b323c119e1e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef FBBROWSER_H
#define FBBROWSER_H

#include "DownloadManager.h"
#include <QtGui>
#include <QtNetwork>

class QWebView;
//QT_BEGIN_NAMESPACE
//class QLineEdit;
//QT_END_NAMESPACE

class fbbrowser : public QMainWindow
{
    Q_OBJECT

public:
    fbbrowser(const QUrl& url);
    ~fbbrowser();
    void printusage();
    Q_INVOKABLE void writeText(QString text); //used for writing web content into a file
    Q_INVOKABLE void quitAll();

private:
    QUrl baseUrl;
    QNetworkRequest request;
    QNetworkReply *reply;
    QWebView *view;
    QNetworkAccessManager *manager;

    // Temporal stuff for the download function...
    // Private download function.
    void download(const QString & file);



private slots:
    void addJSObject();
    void getSysInfo();

signals:
    void signalQuitAll();
};

#endif // FBBROWSER_H