The QSensorManager class handles registration and creation of sensor backends. More...
#include <QSensorManager>
This class was introduced in Qt Mobility 1.0.
QSensorBackend * | createBackend ( QSensor * sensor ) |
bool | isBackendRegistered ( const QByteArray & type, const QByteArray & identifier ) |
void | registerBackend ( const QByteArray & type, const QByteArray & identifier, QSensorBackendFactory * factory ) |
void | unregisterBackend ( const QByteArray & type, const QByteArray & identifier ) |
REGISTER_STATIC_PLUGIN ( pluginname ) |
The QSensorManager class handles registration and creation of sensor backends.
Sensor plugins register backends using the registerBackend() function.
When QSensor::connectToBackend() is called, the createBackend() function will be called.
Create a backend for sensor. Returns null if no suitable backend exists.
This function was introduced in Qt Mobility 1.0.
Returns true if the backend identified by type and identifier is registered.
This is a convenience method that helps out plugins doing dynamic registration.
This function was introduced in Qt Mobility 1.2.
Register a sensor for type. The identifier must be unique.
The factory will be asked to create instances of the backend.
This function was introduced in Qt Mobility 1.0.
Unregister the backend for type with identifier.
Note that this only prevents new instance of the backend from being created. It does not invalidate the existing instances of the backend. The backend code should handle the disappearance of the underlying hardware itself.
This function was introduced in Qt Mobility 1.2.
Registers a static plugin, pluginname.
Note that this macro relies on static initialization so it may not be appropriate for use in a library and may not work on all platforms.
See also Creating a sensor plugin.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.