BALL 1.5.0
buttonEvent.h
Go to the documentation of this file.
1#ifndef BUTTONEVENT_H
2#define BUTTONEVENT_H
3
6
7#include <QtCore/QEvent>
8
9namespace BALL
10{
11 namespace VIEW
12 {
14 BUTTON1 = 1 << 0,
15 BUTTON2 = 1 << 1,
16 BUTTON3 = 1 << 2,
17 BUTTON4 = 1 << 3,
18 BUTTON5 = 1 << 4,
19 BUTTON6 = 1 << 5,
20 BUTTON7 = 1 << 6,
21 BUTTON8 = 1 << 7,
22 BUTTON9 = 1 << 8,
23 BUTTON10 = 1 << 9,
24 BUTTON11 = 1 << 10,
25 BUTTON12 = 1 << 11
26 };
27
28 typedef QFlags<InputDeviceButton> InputDeviceButtons;
29
34 class ButtonEvent : public DeviceEvent
35 {
36 public:
39
43 InputDeviceButton button() const { return cause_; }
44
48 InputDeviceButtons buttons() const { return buttons_; }
49 private:
50 InputDeviceButton cause_;
51 InputDeviceButtons buttons_;
52 };
53
54 }
55}
56
57#endif //BUTTONEVENT_H
58
Definition: constants.h:13
QFlags< InputDeviceButton > InputDeviceButtons
Definition: buttonEvent.h:28
InputDeviceButtons buttons() const
Definition: buttonEvent.h:48
ButtonEvent(EventsIDs type, InputDeviceDriver *dev, InputDeviceButton cause, InputDeviceButtons buttons)
InputDeviceButton button() const
Definition: buttonEvent.h:43
ButtonEvent(EventsIDs type, InputDeviceDriver *dev, InputDeviceButton cause)