diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-01-21 12:01:27 +0200 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-01-21 12:07:00 +0200 |
commit | 1b1dfcaadf83c73d3f7c1c1cd893894a3aea0ecb (patch) | |
tree | 776666dbf0368ec412fcbb154c2fe27076f6d404 /src/datavisualization/input/qabstract3dinputhandler.cpp | |
parent | 177f9d385c8cd062c4bad78cf6b794a96fa025ad (diff) |
InputState enum divided
Task-number: QTRD-2683
Change-Id: Ib05469ac1bf8c8ed828974a3adb91ecb5f8f1fc9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/datavisualization/input/qabstract3dinputhandler.cpp')
-rw-r--r-- | src/datavisualization/input/qabstract3dinputhandler.cpp | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/src/datavisualization/input/qabstract3dinputhandler.cpp b/src/datavisualization/input/qabstract3dinputhandler.cpp index a0811f5b..a369a054 100644 --- a/src/datavisualization/input/qabstract3dinputhandler.cpp +++ b/src/datavisualization/input/qabstract3dinputhandler.cpp @@ -38,12 +38,6 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * * \value InputStateNone * Default "no input received" state. - * \value InputStateOnScene - * Mouse or touch input received on the 3D scene. - * \value InputStateOnPrimaryView - * Mouse or touch input received on the primary view area. - * \value InputStateOnSecondaryView - * Mouse or touch input received on the secondary view area. * \value InputStateRotating * Rotation of the 3D geometry ongoing. * \value InputStatePinching @@ -51,6 +45,19 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION */ /*! + * \enum QAbstract3DInputHandler::InputView + * + * Predefined input views for mouse and touch based input handlers. + * + * \value InputViewNone + * Mouse or touch not on a view. + * \value InputViewOnPrimary + * Mouse or touch input received on the primary view area. + * \value InputViewOnSecondary + * Mouse or touch input received on the secondary view area. + */ + +/*! * \qmltype AbstractInputHandler3D * \inqmlmodule QtDataVisualization * \since QtDataVisualization 1.0 @@ -159,6 +166,25 @@ void QAbstract3DInputHandler::setInputState(InputState inputState) } /*! + * \property QAbstract3DInputHandler::inputView + * + * Current enumerated input view based on the view of the processed input events. + * When the view changes inputViewChanged() is emitted. + */ +QAbstract3DInputHandler::InputView QAbstract3DInputHandler::inputView() +{ + return d_ptr->m_inputView; +} + +void QAbstract3DInputHandler::setInputView(InputView inputView) +{ + if (inputView != d_ptr->m_inputView) { + d_ptr->m_inputView = inputView; + emit inputViewChanged(inputView); + } +} + +/*! * \property QAbstract3DInputHandler::inputPosition * * Last input position based on the processed input events. @@ -234,6 +260,7 @@ QAbstract3DInputHandlerPrivate::QAbstract3DInputHandlerPrivate(QAbstract3DInputH m_prevDistance(0), m_previousInputPos(QPoint(0,0)), m_inputState(QAbstract3DInputHandler::InputStateNone), + m_inputView(QAbstract3DInputHandler::InputViewNone), m_inputPosition(QPoint(0,0)), m_scene(0) { |