summaryrefslogtreecommitdiffstats
path: root/doc/src/qtsensorgestures-emulator.qdoc
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2012-02-10 10:50:14 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-12 23:26:15 +0100
commit3b030528fbc3d2d7681113dc6c2727d4cff7a07a (patch)
treeb4988a0bed2179e905af6934b62dc73f0a0a9d07 /doc/src/qtsensorgestures-emulator.qdoc
parent607f545c719486c4ebc1dd3ea227b268d70b8a16 (diff)
improve the sensors docs a bit
Change-Id: I2774c8ecc5ae711b6444d0adff0697c6d278dcad Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
Diffstat (limited to 'doc/src/qtsensorgestures-emulator.qdoc')
-rw-r--r--doc/src/qtsensorgestures-emulator.qdoc82
1 files changed, 82 insertions, 0 deletions
diff --git a/doc/src/qtsensorgestures-emulator.qdoc b/doc/src/qtsensorgestures-emulator.qdoc
new file mode 100644
index 00000000..f6692783
--- /dev/null
+++ b/doc/src/qtsensorgestures-emulator.qdoc
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+/*!
+\group sensorgesture_emulator_topics
+\title QtSensorGestures Emulator
+\brief Information about the development of clients and recognizer plugins
+ using QtSensorGestures
+
+\section1 Overview
+
+Whether creating client apps using Qt's built-in sensor gestures, or
+creating customized recognizers, the Emulator can be used to help develop client
+apps and recognizers using the special 'QtSensors.emulator' plugin to send
+arbitrary signals to the emulator environment.
+
+\section1 Developing sensor gesture clients.
+
+For instance, the Emulator can be used for writing a client app that needs
+to use a 'spin' gesture. The app can temporarily connect and start the
+'QtSensors.emulator' plugin in the Emulator.
+
+Under the 'Sensors' heading in the Emulator control, you will see an edit
+box for 'Sensor gestures'.
+
+Type the word, "spin", hit enter to set it, and then click the 'Send' button
+to send a detected("spin") signal to the QtSensors.emulator plugin.
+
+You do not even need to wait for the recognizer plugin to be written!
+
+\section1 Developing sensor gesture plugins.
+
+Once the recognizer is written, the scripting facility may be used in the Emulator
+to script the sensors to trigger your custom plugins signals.
+
+A sensor gesture script for the 'turnover' gesture looks like this:
+
+\code
+// simulate turnover gesture
+
+//set the phone FaceUp
+sensors.accelerometerX = 0
+sensors.accelerometerZ = 9.8
+sensors.accelerometerY = 0
+yield(100)
+
+
+// set the phone FaceDown
+sensors.accelerometerZ = -9.8
+
+// set the Proximity to close
+sensors.proximitySensorClose = true
+
+\endcode
+
+This will cause the simulator sensor plugin to send these signals to a real recognizer plugin
+as real QAccelerometer and QProximity sensor values.
+
+*/