summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/input/q3dinputhandler.h
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-07-04 12:14:13 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-07-04 12:55:05 +0300
commit1b311517f8889e6faa8a1ae51af582c1cd07e739 (patch)
treed1b023e36b5c7ddd67368007bb64c4b8551c480b /src/datavisualization/input/q3dinputhandler.h
parent9c3b9fb2d8f07b2b3f2e5bc84653711043c9936c (diff)
Exposed default input handlers to QML
Also added properties to control rotation, zoom, and selection individually. Also added missing documentation about surface texture. Task-number: QTRD-3202 Change-Id: I981edb7f336aea499440559f4a2098711200206d Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'src/datavisualization/input/q3dinputhandler.h')
-rw-r--r--src/datavisualization/input/q3dinputhandler.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/datavisualization/input/q3dinputhandler.h b/src/datavisualization/input/q3dinputhandler.h
index 118bd829..9afeb945 100644
--- a/src/datavisualization/input/q3dinputhandler.h
+++ b/src/datavisualization/input/q3dinputhandler.h
@@ -28,17 +28,32 @@ class Q3DInputHandlerPrivate;
class QT_DATAVISUALIZATION_EXPORT Q3DInputHandler : public QAbstract3DInputHandler
{
Q_OBJECT
+ Q_PROPERTY(bool rotationEnabled READ isRotationEnabled WRITE setRotationEnabled NOTIFY rotationEnabledChanged)
+ Q_PROPERTY(bool zoomEnabled READ isZoomEnabled WRITE setZoomEnabled NOTIFY zoomEnabledChanged)
+ Q_PROPERTY(bool selectionEnabled READ isSelectionEnabled WRITE setSelectionEnabled NOTIFY selectionEnabledChanged)
public:
explicit Q3DInputHandler(QObject *parent = 0);
virtual ~Q3DInputHandler();
+ void setRotationEnabled(bool enable);
+ bool isRotationEnabled() const;
+ void setZoomEnabled(bool enable);
+ bool isZoomEnabled() const;
+ void setSelectionEnabled(bool enable);
+ bool isSelectionEnabled() const;
+
// Input event listeners
virtual void mousePressEvent(QMouseEvent *event, const QPoint &mousePos);
virtual void mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos);
virtual void mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos);
virtual void wheelEvent(QWheelEvent *event);
+signals:
+ void rotationEnabledChanged(bool enable);
+ void zoomEnabledChanged(bool enable);
+ void selectionEnabledChanged(bool enable);
+
private:
Q_DISABLE_COPY(Q3DInputHandler)