forked from blindpirate/no2-linggong-road
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdescriptionwidget.h
More file actions
51 lines (45 loc) · 1.17 KB
/
descriptionwidget.h
File metadata and controls
51 lines (45 loc) · 1.17 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
#ifndef DESCRIPTIONWIDGET_H
#define DESCRIPTIONWIDGET_H
#include "lgl.h"
#include "role.h"
typedef enum
{
ShowRoleInfo,
ShowOperationDescription,
ShowRoleInPoison,//中毒状态
ShowRoleDisabled,//失去行动能力状态
ShowRoleAttackDown,
ShowRoleAccurcyDown,
ShowRoleDefenceDown,
ShowRoleDodgeDown,
ShowRoleSpeedDown,
ShowRoleCritDown
}DescriptionType;
#define DESCRIPTIONDELAY 1000
class DescriptionWidget : public QWidget
{
Q_OBJECT
public:
explicit DescriptionWidget(QWidget *parent);
void show(int rolePointX,int rolePointY,Role *roleInfo);
void show(int rolePointX,int rolePointY,int index);
void show(int rolePointX, int rolePointY, AnimationOperation animationType);
private:
void paintEvent(QPaintEvent *);
void timerEvent(QTimerEvent *);
signals:
void animationEnd();
public slots:
private:
DescriptionType type;
int index;
int x;
int y;
Role *role;
QFont font;
QPixmap *image;
int delayTimerID;
//x,y是绘图原点,对于RoleInfo是x,y+36
//index指operationWidget的index
};
#endif // DESCRIPTIONWIDGET_H