summaryrefslogtreecommitdiffstats
path: root/doc/src/examples/shakeit.qdoc
diff options
context:
space:
mode:
authorWolfgang Beck <wolfgang.beck@nokia.com>2012-02-03 14:31:49 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-14 03:52:38 +0100
commit8d2a6e427067027769e1f3c6322ae06620146396 (patch)
tree1c60262b79fc0b5b4bf70ddce7085cb18c99c5db /doc/src/examples/shakeit.qdoc
parenta1ecc85fa88fdd318b379e35139c5d6486c78bd8 (diff)
Update Examples for SDK team
Change-Id: Ib81ebf326a1ee4330a268c8d57934e3d77ea68bb Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Diffstat (limited to 'doc/src/examples/shakeit.qdoc')
-rw-r--r--doc/src/examples/shakeit.qdoc65
1 files changed, 65 insertions, 0 deletions
diff --git a/doc/src/examples/shakeit.qdoc b/doc/src/examples/shakeit.qdoc
new file mode 100644
index 00000000..409077d8
--- /dev/null
+++ b/doc/src/examples/shakeit.qdoc
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example sensors/shakeit
+ \title ShakeIt! QML Sensor Gestures Example
+ \ingroup qtsensors-examples
+ \brief The sensor gesture example demonstrates the steps for creating a QML application
+ that uses sensor gestures and the included shake sensor.
+ \image shakeit.jpg
+
+ \section1 Overview
+ Writing a QML application that uses the Shake QML sensorgestures element
+ requires the following steps:
+
+ Import the Sensors Declarative module.
+
+ \snippet ../examples/sensors/shakeit/shakeit.qml 0
+
+ Add a SensorGesture QML element.
+
+ \snippet ../examples/sensors/shakeit/shakeit.qml 1
+
+ In the SensorGesture element, specify which gesture to be used.
+ Note that this can be a comma separated list. Here we are only interested in one
+ gesture recognizer.
+
+ \snippet ../examples/sensors/shakeit/shakeit.qml 2
+
+ Use the 'enabled' property to start the sensor gesture.
+
+ \snippet ../examples/sensors/shakeit/shakeit.qml 3
+
+ Use the onDetected signal to do stuff.
+
+ \snippet ../examples/sensors/shakeit/shakeit.qml 4
+
+ There are additional gestures to shake which are supported:
+ whip, twistRight, hover, cover, turnover and pickup.
+
+*/