QSensorManager

Since: 1.0

#include <QtSensors/QSensorManager>

QtSensors

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.


Overview

Static Public Functions Index

QSensorBackend *createBackend (QSensor *sensor)
boolisBackendRegistered (const QByteArray &type, const QByteArray &identifier)
voidregisterBackend (const QByteArray &type, const QByteArray &identifier, QSensorBackendFactory *factory)
voidregisterStaticPlugin (CreatePluginFunc func)
voidunregisterBackend (const QByteArray &type, const QByteArray &identifier)

Static Public Functions

QSensorBackend * createBackend (

Create a backend for sensor.

Returns null if no suitable backend exists.

Since:

1.0

bool isBackendRegistered (

Returns true if the backend identified by type and identifier is registered.

This is a convenience method that helps out plugins doing dynamic registration.
Since:

1.2

void registerBackend (

Register a sensor for type.

The identifier must be unique.

The factory will be asked to create instances of the backend.
Since:

1.0

void registerStaticPlugin (
  • CreatePluginFuncfunc)

void unregisterBackend (

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.
Since:

1.2

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus