-
Notifications
You must be signed in to change notification settings - Fork 12
/
global.h
75 lines (71 loc) · 1.47 KB
/
global.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
#ifndef GLOBAL_H
#define GLOBAL_H
#include <QObject>
#include <QString>
#include <QDir>
#include <QFile>
#include <QTimer>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QDebug>
#include <QRect>
#include <QVariant>
#include <QPixmap>
#include <QStringList>
#include <QMap>
#include <QPoint>
class GLobal : public QObject
{
Q_OBJECT
public:
explicit GLobal(QObject *parent = nullptr);
~GLobal();
QStringList keyNameList;
QList<int> keyNoList;
QStringList comNameList;
QSerialPort *serialPort=NULL;
QList<char> sendCache;
QTimer sendTimer;
int temp=600;
//窗口
bool isWindowOk=false;
QWindow *w;
QPoint mDev;
QPoint tDev;
QRect mHp;
QPixmap buffImgCacheMy[12];
QPixmap buffImgCacheT[12];
QPixmap hpImgCacheMy;
QPixmap killImgCache;
//技能
QRect windowRect;
QRect myBuffRect[12];
QRect targetBuffRect[12];
int myBuffID[12];
int targetBuffID[12];
QList<QVariant> buffDb;
QStringList buffName;
QPixmap nowScreen;
QMap<QString,int> buffNameMap;
//血量
int maxHP;
int nowHP;
QRect hpRect;
QList<QVariant> numDb;
//宏
QString macro;
//技能
QRect killRect;
signals:
public slots:
bool startLink(QString name);
void onReceived();
void sendData();
bool tNoBuff(int id);
bool tBuff(int id);
bool mNoBuff(int id);
bool mBuff(int id);
float perHP();//百分比血量
};
extern GLobal *g;
#endif // GLOBAL_H