BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
ButtonEvent(EventsIDs type, InputDeviceDriver *dev, InputDeviceButton cause)
InputDeviceButtons buttons() const
Definition: buttonEvent.h:48
InputDeviceButton button() const
Definition: buttonEvent.h:43
QFlags< InputDeviceButton > InputDeviceButtons
Definition: buttonEvent.h:28