-
Notifications
You must be signed in to change notification settings - Fork 0
/
switch.h
43 lines (40 loc) · 1010 Bytes
/
switch.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
#ifndef SWITCH_H
#define SWITCH_H
#include <QObject>
#include <QGraphicsPixmapItem>
/** @class Switch
* @brief The Switch class is a class that has an on and off state and is used as a boss mechanic.
*
* The Switch class publicly derives from the QObject and QGraphicsPixmapItem classes.
*/
class Switch : public QObject, public QGraphicsPixmapItem
{
Q_OBJECT
public:
/**
* @brief Switch constructor
*/
Switch();
/**
* @brief Switch destructor
*/
~Switch();
signals:
/**
* @brief green is a custom signal that notifies other objects if it is active
*/
void green();
public slots:
/**
* @brief activate is a custom public slot that activates the Switch object
* @param item is the Switch object being activated
*/
void activate(QGraphicsItem* item);
/**
* @brief deactivate is a custom public slot that deactivates the Switch object
*/
void deactivate();
private:
bool active;
};
#endif // SWITCH_H