-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvirtualmachinecontrol.h
More file actions
78 lines (63 loc) · 1.36 KB
/
virtualmachinecontrol.h
File metadata and controls
78 lines (63 loc) · 1.36 KB
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
#ifndef VIRTUALMACHINECONTROL_H
#define VIRTUALMACHINECONTROL_H
#include <QWidget>
#include <QTimer>
#include <QPainter>
#include <QImage>
#include <QTimer>
#include <QDebug>
#include "vix.h"
#include "rfbclient.h"
#include "dispaly.h"
#pragma comment(lib,"vix.lib")
#pragma comment(lib,"vixd.lib")
#define CONNTYPE VIX_SERVICEPROVIDER_VMWARE_WORKSTATION
#define HOSTNAME ""
#define HOSTPORT 0
#define USERNAME ""
#define PASSWORD ""
#define VMPOWEROPTIONS VIX_VMPOWEROP_LAUNCH_GUI
namespace Ui {
class VirtualMachineControl;
}
class VirtualMachineControl : public QWidget
{
Q_OBJECT
public:
explicit VirtualMachineControl(QString path, QWidget *parent = nullptr);
~VirtualMachineControl();
public:
//链接
bool Link();
//开机
bool PowerOn();
//关机
bool PowerOff();
//登录
bool Login(QString h, QString p);
//登出
void Logout();
//绘制
bool Show();
bool IsLogin();
bool IsStart();
int GetPid();
void SetPid(int pid);
public slots:
void FetchUpdate();
private:
Ui::VirtualMachineControl *ui;
DispalyLabel *dispaly;
int pid;
QString file_path;
QString host;
QString port;
QImage *m_image;
QTimer m_timer;
rfbClient* client;
VixHandle host_handle;
bool power_on;
bool login;
bool show;
};
#endif // VIRTUALMACHINECONTROL_H