forked from anak10thn/ignsdk-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathign.h
105 lines (102 loc) · 2.68 KB
/
ign.h
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#ifndef IGN_H
#define IGN_H
#include "fs.h"
#include "igndownload.h"
#include "ignsql.h"
#include "ignsystem.h"
#include <QtGui/QMainWindow>
#include <QWidget>
#include <QLayout>
#include <QObject>
#include <QMessageBox>
#include <QProcess>
#include <QtWebKit>
#include <QSize>
#include <QtGui>
#include <QVariant>
#include <QCryptographicHash>
#include <QPixmap>
#include <QSplashScreen>
#include <QTimer>
class ign: public QObject
{
Q_OBJECT
private:
QWebView web;
QWebFrame *frame;
bool fullscreen;
fs *filesystem;
QtDownload *dl;
ignsql *sqldrv;
ignsystem *m_ignsystem;
QPoint mLastMousePosition;
bool mMoving;
public:
ign(QObject *parent = 0);
void render(QString w);
void show();
void widgetNoFrame();
void widgetTransparent();
QString pathApp;
QString version;
protected:
//virtual void mouseMoveEvent(QMouseEvent *event);
virtual void mousePressEvent(QMouseEvent * event);
//virtual void mouseReleaseEvent(QMouseEvent *event);
signals:
void downloadProgress(qint64 recieved, qint64 total);
/*void bash(QString out, QString err);*/
public slots:
//main slot
void ignJS();
//ign message
void showMessage(const QString& msg);
//ign developer mode
void setDev(bool v);
//ign signal
void quit();
void back();
void forward();
void reload();
void stop();
//ign window function
void widgetSizeMax(int w,int h);
void widgetSizeMin(int w,int h);
void widgetSize(int w,int h);
void getToggleFullScreen();
void getFullScreen(bool screen);
void showMaximized();
void showMinimized();
//ign system
QString cliOut(const QString& cli);
void exec(const QString& cli);
QString loadBin(const QString &script);
/*void bash(QString out, QString err);*/
//ign manifest
void config(QString path);
//ign settings
void websecurity(bool c);
//ign filesystem
QString homePath();
bool createFile(const QString& path, const QString& data);
QString readFile(const QString &path);
bool mkdir(const QString& path);
bool dirExist(const QString& path);
bool fileExist(const QString& path);
bool fileRemove(const QString& path);
bool rmdir(const QString& path);
//ign network
void saveFile(const QByteArray &data, QString filename, QString path);
void download(QString data, QString path);
void download_signal(qint64 recieved, qint64 total);
//hash function
QString hash(const QString& data, QString hash_func);
//ign sql
void sql(const QString& drv, QString connect);
//experiment
QObject *sys();
//ignsdk version
QString sdkVersion();
};
#endif // IGN_H