Public Types | |
enum | InputType { Mouse , Tablet , Touch , Unknown } |
Public Member Functions | |
PointerEvent (QMouseEvent *event) | |
PointerEvent (QTabletEvent *event) | |
QPoint | pos () const |
Returns QPoint of the device. | |
QPointF | posF () const |
Returns the QPointF of the device Returns pos() if used on mouse event. | |
qreal | pressure () const |
Returns a value between 0 and 1 for tablet events, otherwise 1.0. | |
qreal | rotation () const |
Returns rotation value if any, otherwise 0. | |
qreal | tangentialPressure () const |
Returns the tangential pressure of a tablet's that support it This is typically given by a finger wheel on an airbrush tool. | |
int | x () const |
Returns the x position of the input device in the widget. | |
int | y () const |
Returns the y position of the input device in the widget. | |
bool | isTabletEvent () const |
Returns true if the device was tablet, otherwise false. | |
Qt::KeyboardModifiers | modifiers () const |
Returns the modifier created by keyboard while a device was in use. | |
Qt::MouseButton | button () const |
Returns Qt::MouseButton() | |
Qt::MouseButtons | buttons () const |
Returns Qt::MouseButtons() | |
void | accept () |
void | ignore () |
bool | isAccepted () |
QEvent::Type | eventType () const |
InputType | inputType () const |
QInputDevice::DeviceType | device () const |
QPointingDevice::PointerType | pointerType () const |
Private Attributes | |
QTabletEvent * | mTabletEvent = nullptr |
QMouseEvent * | mMouseEvent = nullptr |
Definition at line 7 of file pointerevent.h.
enum PointerEvent::InputType |
Definition at line 10 of file pointerevent.h.
PointerEvent::PointerEvent | ( | QMouseEvent * | event | ) |
Definition at line 3 of file pointerevent.cpp.
PointerEvent::PointerEvent | ( | QTabletEvent * | event | ) |
Definition at line 8 of file pointerevent.cpp.
PointerEvent::~PointerEvent | ( | ) |
Definition at line 13 of file pointerevent.cpp.
void PointerEvent::accept | ( | ) |
Definition at line 166 of file pointerevent.cpp.
Qt::MouseButton PointerEvent::button | ( | ) | const |
Returns Qt::MouseButton()
Definition at line 45 of file pointerevent.cpp.
Qt::MouseButtons PointerEvent::buttons | ( | ) | const |
Returns Qt::MouseButtons()
Definition at line 61 of file pointerevent.cpp.
QInputDevice::DeviceType PointerEvent::device | ( | ) | const |
Definition at line 239 of file pointerevent.cpp.
QEvent::Type PointerEvent::eventType | ( | ) | const |
Definition at line 212 of file pointerevent.cpp.
void PointerEvent::ignore | ( | ) |
Definition at line 182 of file pointerevent.cpp.
PointerEvent::InputType PointerEvent::inputType | ( | ) | const |
Definition at line 225 of file pointerevent.cpp.
bool PointerEvent::isAccepted | ( | ) |
Definition at line 198 of file pointerevent.cpp.
bool PointerEvent::isTabletEvent | ( | ) | const |
Returns true if the device was tablet, otherwise false.
Definition at line 139 of file pointerevent.cpp.
Qt::KeyboardModifiers PointerEvent::modifiers | ( | ) | const |
Returns the modifier created by keyboard while a device was in use.
Definition at line 151 of file pointerevent.cpp.
QPointingDevice::PointerType PointerEvent::pointerType | ( | ) | const |
Definition at line 248 of file pointerevent.cpp.
QPoint PointerEvent::pos | ( | ) | const |
Returns QPoint of the device.
Definition at line 17 of file pointerevent.cpp.
QPointF PointerEvent::posF | ( | ) | const |
Returns the QPointF of the device Returns pos() if used on mouse event.
Definition at line 31 of file pointerevent.cpp.
qreal PointerEvent::pressure | ( | ) | const |
Returns a value between 0 and 1 for tablet events, otherwise 1.0.
Definition at line 77 of file pointerevent.cpp.
qreal PointerEvent::rotation | ( | ) | const |
Returns rotation value if any, otherwise 0.
Definition at line 86 of file pointerevent.cpp.
qreal PointerEvent::tangentialPressure | ( | ) | const |
Returns the tangential pressure of a tablet's that support it This is typically given by a finger wheel on an airbrush tool.
The range is from -1.0 to 1.0. 0.0 indicates a neutral position. Current airbrushes can only move in the positive direction from the neutral position. If the device does not support tangential pressure, this value is always 0.0.
Definition at line 95 of file pointerevent.cpp.
int PointerEvent::x | ( | ) | const |
Returns the x position of the input device in the widget.
Definition at line 104 of file pointerevent.cpp.
int PointerEvent::y | ( | ) | const |
Returns the y position of the input device in the widget.
Definition at line 122 of file pointerevent.cpp.
|
private |
Definition at line 86 of file pointerevent.h.
|
private |
Definition at line 85 of file pointerevent.h.