Loading...
Searching...
No Matches
buttonEvent.h
Go to the documentation of this file.
#ifndef BUTTONEVENT_H
#define BUTTONEVENT_H
#include <BALL/VIEW/KERNEL/common.h>
#include <BALL/VIEW/INPUT/deviceEvent.h>
#include <QtCore/QEvent>
namespace BALL
{
namespace VIEW
{
enum InputDeviceButton {
BUTTON1 = 1 << 0,
BUTTON2 = 1 << 1,
BUTTON3 = 1 << 2,
BUTTON4 = 1 << 3,
BUTTON5 = 1 << 4,
BUTTON6 = 1 << 5,
BUTTON7 = 1 << 6,
BUTTON8 = 1 << 7,
BUTTON9 = 1 << 8,
BUTTON10 = 1 << 9,
BUTTON11 = 1 << 10,
BUTTON12 = 1 << 11
};
typedef QFlags<InputDeviceButton> InputDeviceButtons;
class ButtonEvent : public DeviceEvent
{
public:
ButtonEvent(EventsIDs type, InputDeviceDriver* dev, InputDeviceButton cause);
ButtonEvent(EventsIDs type, InputDeviceDriver* dev, InputDeviceButton cause, InputDeviceButtons buttons);
InputDeviceButton button() const { return cause_; }
InputDeviceButtons buttons() const { return buttons_; }
private:
InputDeviceButton cause_;
InputDeviceButtons buttons_;
};
}
}
#endif //BUTTONEVENT_H
common.h
BALL::VIEW::ButtonEvent::buttons
InputDeviceButtons buttons() const
Definition buttonEvent.h:48
BALL::VIEW::ButtonEvent::ButtonEvent
ButtonEvent(EventsIDs type, InputDeviceDriver *dev, InputDeviceButton cause, InputDeviceButtons buttons)
BALL::VIEW::ButtonEvent::button
InputDeviceButton button() const
Definition buttonEvent.h:43
BALL::VIEW::ButtonEvent::ButtonEvent
ButtonEvent(EventsIDs type, InputDeviceDriver *dev, InputDeviceButton cause)
BALL::VIEW::DeviceEvent::DeviceEvent
DeviceEvent(EventsIDs type, InputDeviceDriver *device)
BALL::VIEW::InputDeviceDriver
Definition inputDeviceDriver.h:19
deviceEvent.h
BALL::VIEW
Definition constraints.h:35
BALL::VIEW::InputDeviceButtons
QFlags< InputDeviceButton > InputDeviceButtons
Definition buttonEvent.h:28
BALL::VIEW::InputDeviceButton
InputDeviceButton
Definition buttonEvent.h:13
BALL::VIEW::BUTTON5
@ BUTTON5
Definition buttonEvent.h:18
BALL::VIEW::BUTTON10
@ BUTTON10
Definition buttonEvent.h:23
BALL::VIEW::BUTTON7
@ BUTTON7
Definition buttonEvent.h:20
BALL::VIEW::BUTTON12
@ BUTTON12
Definition buttonEvent.h:25
BALL::VIEW::BUTTON6
@ BUTTON6
Definition buttonEvent.h:19
BALL::VIEW::BUTTON2
@ BUTTON2
Definition buttonEvent.h:15
BALL::VIEW::BUTTON3
@ BUTTON3
Definition buttonEvent.h:16
BALL::VIEW::BUTTON4
@ BUTTON4
Definition buttonEvent.h:17
BALL::VIEW::BUTTON8
@ BUTTON8
Definition buttonEvent.h:21
BALL::VIEW::BUTTON9
@ BUTTON9
Definition buttonEvent.h:22
BALL::VIEW::BUTTON1
@ BUTTON1
Definition buttonEvent.h:14
BALL::VIEW::BUTTON11
@ BUTTON11
Definition buttonEvent.h:24
BALL::VIEW::EventsIDs
EventsIDs
Definition VIEW/KERNEL/common.h:72
BALL
Definition constants.h:13