1 #include "pointerevent.h"
13 PointerEvent::~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)
166 void PointerEvent::accept()
172 else if (mTabletEvent)
182 void PointerEvent::ignore()
188 else if (mTabletEvent)
198 bool PointerEvent::isAccepted()
204 else if (mTabletEvent)
216 return mMouseEvent->
type();
218 else if (mTabletEvent)
220 return mTabletEvent->
type();
225 PointerEvent::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 rotation() const const
typedef KeyboardModifiers
QEvent::Type type() const const
Qt::KeyboardModifiers modifiers() const
Returns the modifier created by keyboard while a device was in use.
qreal pressure() const const
QTabletEvent::TabletDevice device() const const
QPointF posF() const
Returns the QPointF of the device Returns pos() if used on mouse event.
int x() const
Returns the x position of the input device in the widget.
const QPointF & localPos() const const
bool isAccepted() const const
QPoint pos() const
Returns QPoint of the device.
bool isTabletEvent() const
Returns true if the device was tablet, otherwise false.
QTabletEvent::PointerType pointerType() const const
Qt::MouseButtons buttons() const
Returns Qt::MouseButtons()
qreal pressure() const
Returns a value between 0 and 1 for tablet events, otherwise 1.0.
qreal tangentialPressure() const
Returns the tangential pressure of a tablet's that support it This is typically given by a finger whe...
qreal rotation() const
Returns rotation value if any, otherwise 0.
qreal tangentialPressure() const const
Qt::MouseButton button() const
Returns Qt::MouseButton()
int y() const
Returns the y position of the input device in the widget.
const QPointF & posF() const const