-
Notifications
You must be signed in to change notification settings - Fork 0
/
seat.h
47 lines (29 loc) · 789 Bytes
/
seat.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
#ifndef SEAT_H
#define SEAT_H
#include <QGraphicsItem>
#include "airplanewidget.h"
class AirPlaneWidget;
class Seat : public QObject, public QGraphicsItem
{
Q_OBJECT
Q_INTERFACES(QGraphicsItem)
public:
explicit Seat(AirPlaneWidget *airPlaneWidget = 0,
const bool taken = false);
~Seat();
bool taken() const;
void setTaken(const bool taken = true);
protected:
void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget);
QRectF boundingRect() const;
void mousePressEvent (QGraphicsSceneMouseEvent *event);
signals:
void clicked(Seat*);
private:
void cancelReservationDialog();
AirPlaneWidget *m_airPlaneWidget;
bool m_taken;
};
#endif // SEAT_H