-
Notifications
You must be signed in to change notification settings - Fork 0
/
wall.h
65 lines (54 loc) · 1.48 KB
/
wall.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
#ifndef WALL_H
#define WALL_H
//класс описания стен, цели и т.д.
#include <QWidget>
//#include <QTimer>
//#include <QResizeEvent>
#include <QPainter>
#include <QLabel>
//#include "battlefield.h"
//#include "paint.h"
//#include "ui_paint.h"
class Paint;
class Tank;
class Wall : public QWidget
{
Q_OBJECT
public:
/*explicit*/ Wall() {};
Wall(int r_number, int x, int y, int r_status, QLabel &r_label, QPixmap &r_pixmap)
{
number = r_number;
x_wposition = x;
y_wposition = y;
status = r_status; //степень повреждений
w_label = &r_label;
w_pixmap = &r_pixmap;
};
friend class Paint;
//void DrawWall(int n_X, int n_Y);
void AddWall(int _number, //внесение новой стены
int _x, int _y,
int _status,
QLabel &_label,
QPixmap &_pixmap);
void SetStatus(int status);
int GetStatus();
void Repaint();
void SetLabel(QLabel &label);
void SetCoordinates(int x, int y);
void SetPixmap(QPixmap &pixmap);
void SetNumber(int number);
int GetNumber(void);
void Struck();
private:
QLabel *w_label;
QPixmap *w_pixmap;
int x_wposition, y_wposition, number, status;
QPixmap wall_destroyed;
QPixmap wall;
QPixmap target;
QPixmap ground;
Paint *paint;
};
#endif // WALL_H