Base QGraphicsScene providing pan, pinch-zoom and swipe gesture handling for sensor-layout scenes. More...
#include <layoutscene.h>
Public Member Functions | |
| LayoutScene (QGraphicsView *view, QObject *parent=0) | |
Protected Member Functions | |
| void | wheelEvent (QGraphicsSceneWheelEvent *event) |
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| void | mousePressEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| void | keyPressEvent (QKeyEvent *keyEvent) |
| void | keyReleaseEvent (QKeyEvent *keyEvent) |
| bool | event (QEvent *event) |
| bool | gestureEvent (QGestureEvent *event) |
| void | panTriggered (QPanGesture *) |
| void | pinchTriggered (QPinchGesture *) |
| void | swipeTriggered (QSwipeGesture *) |
| bool | eventFilter (QObject *object, QEvent *event) |
Protected Attributes | |
| QGraphicsView * | m_qvView |
| bool | m_bDragMode |
| QPointF | m_mousePressPosition |
Base QGraphicsScene providing pan, pinch-zoom and swipe gesture handling for sensor-layout scenes.
Installs gesture recognisers on the active view and translates pan / pinch / swipe events into view-zoom / view-pan operations regardless of input device.
Definition at line 69 of file layoutscene.h.

| LayoutScene::LayoutScene | ( | QGraphicsView * | view, |
| QObject * | parent = 0 ) |
Constructs a LayoutScene.
| [in] | view | Graphics view that displays this scene and is zoomed/panned by it. |
| [in] | parent | Parent QObject (default 0). |
Definition at line 41 of file layoutscene.cpp.
|
protected |
reimplemented event function - intercepts touch gestures
| [in] | event | The incoming event. |
Definition at line 187 of file layoutscene.cpp.
|
protected |
Installed event filter.
| [in] | object | the qt object for which the event was intercpeted. |
| [in] | event | the current event. |
Definition at line 238 of file layoutscene.cpp.
|
protected |
gestureEvent processes gesture events
| [in] | event | Gesture event whose pan and pinch gestures are dispatched. |
Definition at line 205 of file layoutscene.cpp.
|
protected |
Reimplemented key press event.
| [in] | keyEvent | The key event, forwarded to QGraphicsScene. |
Definition at line 167 of file layoutscene.cpp.
|
protected |
Reimplemented key release event.
| [in] | keyEvent | The key event, forwarded to QGraphicsScene. |
Definition at line 177 of file layoutscene.cpp.
|
protected |
Reimplemented double mouse press event.
| [in] | mouseEvent | The mouse event; a left double click fits all items into the view. |
Definition at line 74 of file layoutscene.cpp.
|
protected |
Reimplemented double mouse move event.
| [in] | mouseEvent | The mouse event; pans the view while in drag mode. |
Definition at line 112 of file layoutscene.cpp.
|
protected |
Reimplemented mouse press event.
| [in] | mouseEvent | The mouse event; left starts rubber-band selection, right starts panning. |
Definition at line 84 of file layoutscene.cpp.
|
protected |
Reimplemented double mouse release event.
| [in] | mouseEvent | The mouse event; ends drag mode. |
Definition at line 129 of file layoutscene.cpp.
|
protected |
pinchTriggered processes pan gesture events
Definition at line 220 of file layoutscene.cpp.
|
protected |
pinchTriggered processes pinch gesture events
Definition at line 230 of file layoutscene.cpp.
|
protected |
pinchTriggered processes swipe gesture events
|
protected |
Reimplemented wheel event.
| [in] | event | The wheel event; scales the view by 1.15 per step under the mouse. |
Definition at line 57 of file layoutscene.cpp.
|
protected |
Flag whether the drag mode is activated.
Definition at line 193 of file layoutscene.h.
|
protected |
The current mouse press location.
Definition at line 195 of file layoutscene.h.
|
protected |
The view which visualizes this scene.
Definition at line 190 of file layoutscene.h.