-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebconsole.h
54 lines (43 loc) · 1.06 KB
/
webconsole.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
#ifndef WEBCONSOLE_H
#define WEBCONSOLE_H
#include <QWebChannel>
#include <QWebEngineView>
#include <QWidget>
#include "components/alertwindow.h"
#include "connectinfo.h"
#include "sshclient.h"
#ifdef WIN32
#pragma execution_character_set("utf-8")
#endif
namespace Ui {
class WebConsole;
}
class WebConsole : public QWidget {
Q_OBJECT
public:
WebConsole(QWidget* parent, ConnectInfo* info);
~WebConsole();
ConnectInfo connectInfo;
SSHClient* sshClient = NULL;
QWebEngineView* webView;
QWebChannel* webChannel;
protected:
void closeEvent(QCloseEvent* event);
void paintEvent(QPaintEvent* event);
private:
Ui::WebConsole* ui;
void resizeEvent(QResizeEvent*);
bool openChannelSeccess = false;
int rows;
int cols;
QString clientId;
public slots:
void connectSuccess();
void pageLoadFinished(bool flag);
void channelDataHandle(QString data);
// QWebChannel function
void ssh2connect(const QString& jsMsg);
void recieveJsMessage(const QString& jsMsg);
void setChannelRequestPtySize(const QString& size);
};
#endif // WEBCONSOLE_H