1#include "pointerevent.h"
13PointerEvent::~PointerEvent()
21 return mMouseEvent->
pos();
23 else if (mTabletEvent)
25 return mTabletEvent->
pos();
37 else if (mTabletEvent)
39 return mTabletEvent->
posF();
49 return mMouseEvent->
button();
51 else if (mTabletEvent)
53 return mTabletEvent->
button();
67 else if (mTabletEvent)
108 return mMouseEvent->
x();
110 else if (mTabletEvent)
112 return mTabletEvent->
x();
126 return mMouseEvent->
y();
128 else if (mTabletEvent)
130 return mTabletEvent->
y();
157 else if (mTabletEvent)
166void PointerEvent::accept()
172 else if (mTabletEvent)
182void PointerEvent::ignore()
188 else if (mTabletEvent)
198bool PointerEvent::isAccepted()
204 else if (mTabletEvent)
216 return mMouseEvent->
type();
218 else if (mTabletEvent)
220 return mTabletEvent->
type();
225PointerEvent::InputType PointerEvent::inputType()
const
228 return InputType::Mouse;
230 else if (mTabletEvent)
232 return InputType::Tablet;
234 return InputType::Unknown;
241 return mTabletEvent->
device();
243 return QTabletEvent::TabletDevice::NoDevice;
252 return QTabletEvent::PointerType::UnknownPointer;
qreal tangentialPressure() const
Returns the tangential pressure of a tablet's that support it This is typically given by a finger whe...
QPoint pos() const
Returns QPoint of the device.
int x() const
Returns the x position of the input device in the widget.
Qt::MouseButton button() const
Returns Qt::MouseButton()
bool isTabletEvent() const
Returns true if the device was tablet, otherwise false.
QPointF posF() const
Returns the QPointF of the device Returns pos() if used on mouse event.
int y() const
Returns the y position of the input device in the widget.
qreal rotation() const
Returns rotation value if any, otherwise 0.
Qt::KeyboardModifiers modifiers() const
Returns the modifier created by keyboard while a device was in use.
Qt::MouseButtons buttons() const
Returns Qt::MouseButtons()
qreal pressure() const
Returns a value between 0 and 1 for tablet events, otherwise 1.0.
bool isAccepted() const const
QEvent::Type type() const const
const QPointF & localPos() const const
typedef KeyboardModifiers
QTabletEvent::TabletDevice device() const const
QTabletEvent::PointerType pointerType() const const
const QPointF & posF() const const
qreal pressure() const const
qreal rotation() const const
qreal tangentialPressure() const const