diff options
Diffstat (limited to 'src/gui/kernel/qevent.h')
-rw-r--r-- | src/gui/kernel/qevent.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 6fca54e2b6..35a8884865 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -162,6 +162,8 @@ protected: class Q_GUI_EXPORT QWheelEvent : public QInputEvent { public: + enum { DefaultDeltasPerStep = 120 }; + QWheelEvent(const QPointF &pos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient = Qt::Vertical); @@ -174,7 +176,9 @@ public: QWheelEvent(const QPointF &pos, const QPointF& globalPos, QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase); - + QWheelEvent(const QPointF &pos, const QPointF &globalPos, QPoint pixelDelta, QPoint angleDelta, + int qt4Delta, Qt::Orientation qt4Orientation, Qt::MouseButtons buttons, + Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, Qt::MouseEventSource source); ~QWheelEvent(); @@ -199,6 +203,8 @@ public: inline Qt::ScrollPhase phase() const { return Qt::ScrollPhase(ph); } + Qt::MouseEventSource source() const { return Qt::MouseEventSource(src); } + protected: QPointF p; QPointF g; @@ -208,7 +214,8 @@ protected: Qt::Orientation qt4O; Qt::MouseButtons mouseState; uint ph : 2; - int reserved : 30; + uint src: 2; + int reserved : 28; }; #endif @@ -408,6 +415,23 @@ protected: QRegion rgn; }; +class Q_GUI_EXPORT QPlatformSurfaceEvent : public QEvent +{ +public: + enum SurfaceEventType { + SurfaceCreated, + SurfaceAboutToBeDestroyed + }; + + explicit QPlatformSurfaceEvent(SurfaceEventType surfaceEventType); + ~QPlatformSurfaceEvent(); + + inline SurfaceEventType surfaceEventType() const { return m_surfaceEventType; } + +protected: + SurfaceEventType m_surfaceEventType; +}; + class Q_GUI_EXPORT QResizeEvent : public QEvent { public: |