summaryrefslogtreecommitdiffstats
path: root/src/fbbrowser.h
blob: 7def71f3fa2bc22f668ade26efdfb21946c09430 (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
46
47
48
49
50
51
52
53
54
#ifndef FBBROWSER_H
#define FBBROWSER_H

#include <QString>
#include <QtGui>
#include <QtWebKit>

#include "JSObject.h"
#include "DownloadManager.h"

extern QUrl baseUrl;

class QWebView;
class QWebFrame;
class JSObject;
class DownloadManager;

class fbbrowser : public QWidget
{
    Q_OBJECT

public:
    fbbrowser();
    ~fbbrowser();

private:
    QMainWindow *mw;
    QWebView *view;
    QWebFrame* qwf;

    QNetworkRequest request;
    QNetworkReply *reply;
    QNetworkAccessManager *manager;

	//the jsObject. connection to the webpage for emiting signals
	JSObject *jso;
	DownloadManager* dm;

signals:
	void printMAC(QString& macAddress);
	void printTime(QString& time);
	void downloadFile(QUrl& fileUrl);
	void updateProgress(int progress);
	void killApp();

public slots:
	void getMAC();
	void getTime();
	void forwardUpdateProgress(int progress);
	void forwardDownloadRequest(QString& filename);
	void quit();
};

#endif // FBBROWSER_H