Sensor Gestures C++ Overview¶
Explains how to use the QtSensorGestures C++ API
With the Sensor Gestures classes, you are able to easily utilize device gesturing using sensors, such as the accelerometer and proximity.
A list of currently supported sensor gestures and their descriptions can be found here: Qt Sensor Gestures
QtSensorGesturesis easy. There are two main classes you will need to use:
QSensorGestureManager: can be used for determining which sensor gestures are available.
QSensorGesture: for connecting the sensor gesture signals.// Create a QSensorGestureManager QSensorGestureManager gestureManager; // Get a list of known recognizers QStringList recognizersList = gestureManager.gestureIds(); // Create a QSensorGeture object for each of those gesture recognizers QSensorGesture *gesture = new QSensorGesture( gestureManager.gestureIds(), this); // Connect the known signals up. connect(gesture, SIGNAL(detected(QString)), this, SLOT(gestureDetected(QString)));
More information about the sensor gesture recognizers can be found in QtSensorGestures Plugins .
The primary classes that make up the QtSensorGestures API:
The QSensorGesture class represents one or more sensor gesture recognizers.
The QSensorGestureManager class manages sensor gestures, registers and creates sensor gesture plugins.
The primary classes that make up the
The QSensorGesturePluginInterface class is the pure virtual interface to sensor gesture plugins.
The QSensorGestureRecognizer class is the base class for a sensor gesture recognizer.
Details of the
© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.