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 
9 namespace 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 
BALL::VIEW::BUTTON9
@ BUTTON9
Definition: buttonEvent.h:22
BALL::VIEW::BUTTON8
@ BUTTON8
Definition: buttonEvent.h:21
BALL::VIEW::BUTTON10
@ BUTTON10
Definition: buttonEvent.h:23
BALL::VIEW::InputDeviceButtons
QFlags< InputDeviceButton > InputDeviceButtons
Definition: buttonEvent.h:28
BALL::VIEW::BUTTON5
@ BUTTON5
Definition: buttonEvent.h:18
BALL::VIEW::BUTTON7
@ BUTTON7
Definition: buttonEvent.h:20
deviceEvent.h
BALL::VIEW::BUTTON11
@ BUTTON11
Definition: buttonEvent.h:24
BALL::VIEW::BUTTON4
@ BUTTON4
Definition: buttonEvent.h:17
BALL
Definition: constants.h:12
common.h
BALL::VIEW::BUTTON2
@ BUTTON2
Definition: buttonEvent.h:15
BALL::VIEW::ButtonEvent
Definition: buttonEvent.h:34
BALL::VIEW::BUTTON1
@ BUTTON1
Definition: buttonEvent.h:14
BALL::VIEW::BUTTON6
@ BUTTON6
Definition: buttonEvent.h:19
BALL::VIEW::ButtonEvent::ButtonEvent
ButtonEvent(EventsIDs type, InputDeviceDriver *dev, InputDeviceButton cause)
BALL::VIEW::ButtonEvent::button
InputDeviceButton button() const
Definition: buttonEvent.h:43
BALL::VIEW::ButtonEvent::buttons
InputDeviceButtons buttons() const
Definition: buttonEvent.h:48
BALL::VIEW::BUTTON3
@ BUTTON3
Definition: buttonEvent.h:16
BALL::VIEW::InputDeviceButton
InputDeviceButton
Definition: buttonEvent.h:13
BALL::VIEW::EventsIDs
EventsIDs
Definition: VIEW/KERNEL/common.h:71
BALL::VIEW::InputDeviceDriver
Definition: inputDeviceDriver.h:18
BALL::VIEW::DeviceEvent
Definition: deviceEvent.h:14
BALL::VIEW::BUTTON12
@ BUTTON12
Definition: buttonEvent.h:25