-
Notifications
You must be signed in to change notification settings - Fork 0
/
box.h
50 lines (31 loc) · 833 Bytes
/
box.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
#ifndef BOX_H
#define BOX_H
#include <QGraphicsRectItem>
#include <QDebug>
#include <QObject>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QKeyEvent>
class Box : public QObject, public QGraphicsRectItem
{
Q_OBJECT
public:
explicit Box(QObject *parent = nullptr);
Box(int x, int y, int width, int heigth);
void keyPressEvent(QKeyEvent * event);
void selectRandomBox(int tester);
void CreateTheArray();
void CreateLivesArray();
void CreateLivesList();
void AddToScene(QGraphicsScene *thescene, Box * theArray[]);
void AddToScene(Box * theArray[], QGraphicsScene *thescene);
void RemoveLifePoint();
bool getColor() const;
void setColor(bool value);
unsigned int focusedBox = 0;
private:
bool color;
signals:
public slots:
};
#endif // BOX_H