-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sicily.h
84 lines (64 loc) · 1.56 KB
/
Sicily.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
#ifndef SICILY_H
#define SICILY_H
#include "Defines.h"
#include "ChatBox.h"
#include "ActionList.h"
namespace Ui {
class Sicily;
}
#define SICILY_PORT 3939
class Sicily : public QMainWindow
{
Q_OBJECT
public:
explicit Sicily(QWidget *parent = 0);
~Sicily();
private slots:
void timerUpDate();
//void Receive(const char *cstr,int len);
void readPendingDatagrams();
private:
Ui::Sicily *ui;
QPixmap sbody;
QPixmap sface[3];
QPixmap wings[2];
float wingCos[360 * 6];
ChatBox *chatbox;
int deskWidth,deskHeight;
const int sicilyPosX = -66;
const int sicilyPosY = -8;
int lastTime;
int playTime;
int wingID;
//TCPServer *server;
QUdpSocket *receiver;
QPoint dragPosition;
int ox,oy;
int dragTime;
ActionList actionList;
bool sleeped;
int sleepTime;
void paintEvent(QPaintEvent *);
void mousePressEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
void Restart();
void SaveData();
void LoadData();
void SwitchHint(bool top);
//封装一些功能
void ReadResource();
void ReadModules();
void InitData();
void FixPos(int h);
//Update
//更新动画
void UpdateAnimation();
void UpdateButton();
private:
bool haveError;
string errorMsg;
private:
void SicilySay(string text,int time = 0);//time = 0的为优先级最低的语句,可以覆盖
};
#endif // MAINWINDOW_H