summaryrefslogtreecommitdiffstats
path: root/src/sensors/qsensor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sensors/qsensor.h')
-rw-r--r--src/sensors/qsensor.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sensors/qsensor.h b/src/sensors/qsensor.h
index 80689267..43fe221c 100644
--- a/src/sensors/qsensor.h
+++ b/src/sensors/qsensor.h
@@ -79,6 +79,7 @@ class Q_SENSORS_EXPORT QSensor : public QObject
friend class QSensorBackend;
Q_OBJECT
+ Q_ENUMS(Feature)
Q_PROPERTY(QByteArray sensorid READ identifier WRITE setIdentifier)
Q_PROPERTY(QByteArray type READ type)
Q_PROPERTY(bool connectedToBackend READ isConnectedToBackend)
@@ -98,6 +99,14 @@ class Q_SENSORS_EXPORT QSensor : public QObject
Q_PROPERTY(int bufferSize)
#endif
public:
+ enum Feature {
+ Buffering,
+ AlwaysOn,
+ GeoValues,
+ FieldOfView,
+ Reserved = 257 // Make sure at least 2 bytes are used for the enum to avoid breaking BC later
+ };
+
explicit QSensor(const QByteArray &type, QObject *parent = 0);
virtual ~QSensor();
@@ -142,6 +151,8 @@ public:
static QList<QByteArray> sensorsForType(const QByteArray &type);
static QByteArray defaultSensorForType(const QByteArray &type);
+ Q_INVOKABLE bool isFeatureSupported(Feature feature) const;
+
public Q_SLOTS:
// Start receiving values from the sensor
bool start();