-
Notifications
You must be signed in to change notification settings - Fork 1
/
consttools.h
82 lines (61 loc) · 1.88 KB
/
consttools.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
#ifndef CONSTTOOLS_H
#define CONSTTOOLS_H
#include "gametools.h"
#include <QPixmap>
#include <QPainter>
////////////////////////////////////////////////////////////////////////////////
class ConstBonus : public GameTool
{
Q_OBJECT
public:
ConstBonus(int x, int y, int score, const QString &resource);
virtual ~ConstBonus() {}
virtual ToolType type() const { return ConstTool; }
inline int value() const { return bonusValue; }
inline void setValue(int val) { bonusValue = val; }
protected:
QPixmap smallPixmap;
int bonusValue;
};
////////////////////////////////////////////////////////////////////////////////
class MagBonus : public ConstBonus
{
Q_OBJECT
public:
MagBonus(int x, int y, int score);
virtual ~MagBonus() {}
virtual bool checkToolClick();
virtual void advanceAndPaint(QPainter &p, int currentScore);
};
////////////////////////////////////////////////////////////////////////////////
class TimerBonus : public ConstBonus
{
Q_OBJECT
public:
TimerBonus(int x, int y, int score);
virtual ~TimerBonus() {}
virtual bool checkToolClick();
virtual void advanceAndPaint(QPainter &p, int currentScore);
};
////////////////////////////////////////////////////////////////////////////////
class ScoreBonus : public ConstBonus
{
Q_OBJECT
public:
ScoreBonus(int x, int y, int score);
virtual ~ScoreBonus() {}
virtual bool checkToolClick();
virtual void advanceAndPaint(QPainter &p, int currentScore);
};
////////////////////////////////////////////////////////////////////////////////
class ClockBonus : public ConstBonus
{
Q_OBJECT
public:
ClockBonus(int x, int y, int score);
virtual ~ClockBonus() {}
virtual bool checkToolClick();
virtual void advanceAndPaint(QPainter &p, int currentScore);
};
////////////////////////////////////////////////////////////////////////////////
#endif // CONSTTOOLS_H