summaryrefslogtreecommitdiffstats
path: root/examples/custominput/custominputhandler.cpp
diff options
context:
space:
mode:
authorKeränen Pasi <pasi.keranen@digia.com>2013-11-28 23:44:22 +0200
committerPasi Keränen <pasi.keranen@digia.com>2013-11-29 14:01:11 +0200
commit91c9f6791af049b873b7c60a88aa226eaec70c18 (patch)
tree2045e8d4dffe2d79cbc5db98b4a295924cc55540 /examples/custominput/custominputhandler.cpp
parenta7273a8f86d8f67afb9b9693b0a0be0ae030c8a6 (diff)
InputHandler C++ Example Documentation.
Task-id: QTRD-2634 Change-Id: I486f210ed9c87079d6bc93ec10ab1f1831254d3f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'examples/custominput/custominputhandler.cpp')
-rw-r--r--examples/custominput/custominputhandler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/custominput/custominputhandler.cpp b/examples/custominput/custominputhandler.cpp
index dad7c851..3b050fda 100644
--- a/examples/custominput/custominputhandler.cpp
+++ b/examples/custominput/custominputhandler.cpp
@@ -25,11 +25,15 @@ CustomInputHandler::CustomInputHandler(QObject *parent) :
{
}
+//! [0]
void CustomInputHandler::mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos)
{
+ Q_UNUSED(event)
setInputPosition(mousePos);
}
+//! [0]
+//! [1]
void CustomInputHandler::wheelEvent(QWheelEvent *event)
{
// Adjust zoom level based on what zoom range we're in.
@@ -47,3 +51,4 @@ void CustomInputHandler::wheelEvent(QWheelEvent *event)
scene()->activeCamera()->setZoomLevel(zoomLevel);
}
+//! [1]