blob: 0953fd6410e6a904cab4eac11edce06481f4f195 (
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
55
56
57
58
59
60
|
/*
* JavaScriptInterface.h
*
* Created on: Oct 26, 2011
* Author: ssc
*/
#ifndef JAVASCRIPTINTERFACE_H_
#define JAVASCRIPTINTERFACE_H_
#include <QObject>
#include <QWebFrame>
#include <QWebView>
#include <QVariantList>
#include <QVariantMap>
//#include "QWebViewCustom.h"
class Session;
class JavaScriptInterface: public QObject {
Q_OBJECT
public:
JavaScriptInterface(QWebView* parent = 0);
virtual ~JavaScriptInterface();
void addItems(const QList<Session *> entries);
private:
QWebFrame* m_dom;
QHash<int, Session*> m_data;
int index;
signals:
void quit();
void start();
void help();
signals:
void hideMainWindow();
public slots:
void attachToDOM();
QVariantList getList();
QString getDetails(int id);
QString getFoo();
QString getAbout();
QString getHelp();
QString getWelcome();
void run(int id);
};
#endif /* JAVASCRIPTINTERFACE_H_ */
|