v2.0.0
Loading...
Searching...
No Matches
DISPLIB::LayoutScene Class Reference

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

Detailed Description

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.

Inheritance diagram for DISPLIB::LayoutScene:
Inheritance graph

Constructor & Destructor Documentation

◆ LayoutScene()

LayoutScene::LayoutScene ( QGraphicsView * view,
QObject * parent = 0 )

Constructs a LayoutScene.

Definition at line 41 of file layoutscene.cpp.

Member Function Documentation

◆ event()

bool LayoutScene::event ( QEvent * event)
protected

reimplemented event function - intercepts touch gestures

Definition at line 186 of file layoutscene.cpp.

◆ eventFilter()

bool LayoutScene::eventFilter ( QObject * object,
QEvent * event )
protected

Installed event filter.

Parameters
[in]objthe qt object for which the event was intercpeted.
[in]eventthe current event.

Definition at line 237 of file layoutscene.cpp.

◆ gestureEvent()

bool LayoutScene::gestureEvent ( QGestureEvent * event)
protected

gestureEvent processes gesture events

Definition at line 204 of file layoutscene.cpp.

◆ keyPressEvent()

void LayoutScene::keyPressEvent ( QKeyEvent * keyEvent)
protected

Reimplemented key press event.

Definition at line 166 of file layoutscene.cpp.

◆ keyReleaseEvent()

void LayoutScene::keyReleaseEvent ( QKeyEvent * keyEvent)
protected

Reimplemented key release event.

Definition at line 176 of file layoutscene.cpp.

◆ mouseDoubleClickEvent()

void LayoutScene::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent * mouseEvent)
protected

Reimplemented double mouse press event.

Definition at line 73 of file layoutscene.cpp.

◆ mouseMoveEvent()

void LayoutScene::mouseMoveEvent ( QGraphicsSceneMouseEvent * mouseEvent)
protected

Reimplemented double mouse move event.

Definition at line 111 of file layoutscene.cpp.

◆ mousePressEvent()

void LayoutScene::mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent)
protected

Reimplemented mouse press event.

Definition at line 83 of file layoutscene.cpp.

◆ mouseReleaseEvent()

void LayoutScene::mouseReleaseEvent ( QGraphicsSceneMouseEvent * mouseEvent)
protected

Reimplemented double mouse release event.

Definition at line 128 of file layoutscene.cpp.

◆ panTriggered()

void LayoutScene::panTriggered ( QPanGesture * gesture)
protected

pinchTriggered processes pan gesture events

Definition at line 219 of file layoutscene.cpp.

◆ pinchTriggered()

void LayoutScene::pinchTriggered ( QPinchGesture * gesture)
protected

pinchTriggered processes pinch gesture events

Definition at line 229 of file layoutscene.cpp.

◆ swipeTriggered()

void DISPLIB::LayoutScene::swipeTriggered ( QSwipeGesture * )
protected

pinchTriggered processes swipe gesture events

◆ wheelEvent()

void LayoutScene::wheelEvent ( QGraphicsSceneWheelEvent * event)
protected

Reimplemented wheel event.

Definition at line 57 of file layoutscene.cpp.

Member Data Documentation

◆ m_bDragMode

bool DISPLIB::LayoutScene::m_bDragMode
protected

Flag whether the drag mode is activated.

Definition at line 166 of file layoutscene.h.

◆ m_mousePressPosition

QPointF DISPLIB::LayoutScene::m_mousePressPosition
protected

The current mouse press location.

Definition at line 168 of file layoutscene.h.

◆ m_qvView

QGraphicsView* DISPLIB::LayoutScene::m_qvView
protected

The view which visualizes this scene.

Definition at line 163 of file layoutscene.h.


The documentation for this class was generated from the following files: