summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/sensors/qmlqtsensors/components/ApplicationWindow.qml4
-rw-r--r--examples/sensors/qmlqtsensors/components/Divider.qml61
-rw-r--r--examples/sensors/qmlqtsensors/qmlqtsensors.qml270
-rw-r--r--examples/sensors/qmlqtsensors/qmlqtsensors.qrc1
-rw-r--r--src/imports/sensors/plugins.qmltypes173
-rw-r--r--src/imports/sensors/qmlholstersensor.cpp2
-rw-r--r--src/plugins/sensorgestures/shake/qshakerecognizer.cpp1
-rw-r--r--src/plugins/sensors/sensorfw/sensorfw.pro4
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwaccelerometer.cpp1
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwals.cpp1
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwals.h1
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwcompass.cpp1
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwcompass.h2
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwgyroscope.cpp1
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwirproximitysensor.cpp1
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwlightsensor.cpp1
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwlightsensor.h2
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwmagnetometer.cpp17
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwmagnetometer.h2
-rw-r--r--src/plugins/sensors/sensorfw/sensorfworientationsensor.cpp3
-rw-r--r--src/plugins/sensors/sensorfw/sensorfworientationsensor.h1
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwproximitysensor.cpp1
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwproximitysensor.h1
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwrotationsensor.cpp5
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwrotationsensor.h2
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp2
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwsensorbase.h11
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwtapsensor.cpp7
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwtapsensor.h2
-rw-r--r--src/sensors/doc/src/qtsensors.qdoc2
-rw-r--r--src/sensors/doc/src/sensor-examples.qdoc4
-rw-r--r--sync.profile8
32 files changed, 333 insertions, 262 deletions
diff --git a/examples/sensors/qmlqtsensors/components/ApplicationWindow.qml b/examples/sensors/qmlqtsensors/components/ApplicationWindow.qml
index 06654e41..bf130dcd 100644
--- a/examples/sensors/qmlqtsensors/components/ApplicationWindow.qml
+++ b/examples/sensors/qmlqtsensors/components/ApplicationWindow.qml
@@ -43,9 +43,7 @@ import QtQuick 2.0
Rectangle {
id: appWnd
- x: 0
- y: 0
width: 320
height: 480
- color: "#ececec"
+ color: "#868482"
}
diff --git a/examples/sensors/qmlqtsensors/components/Divider.qml b/examples/sensors/qmlqtsensors/components/Divider.qml
new file mode 100644
index 00000000..225b01fa
--- /dev/null
+++ b/examples/sensors/qmlqtsensors/components/Divider.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtSensors module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Column {
+ spacing: 5
+ width: parent.width
+ property alias label: textLabel.text
+
+ Rectangle {
+ border.width: 1
+ height: 2
+ width: parent.width
+ anchors.margins: 20
+ border.color: "#2d2b19"
+ }
+ Text {
+ id: textLabel
+ width: parent.width
+ horizontalAlignment: Text.AlignHCenter
+ font.bold: true
+ }
+}
diff --git a/examples/sensors/qmlqtsensors/qmlqtsensors.qml b/examples/sensors/qmlqtsensors/qmlqtsensors.qml
index 496aea1f..4967f5e8 100644
--- a/examples/sensors/qmlqtsensors/qmlqtsensors.qml
+++ b/examples/sensors/qmlqtsensors/qmlqtsensors.qml
@@ -92,234 +92,138 @@ import QtSensors 5.0
//! [0]
ApplicationWindow {
- id: appWnd
- Rectangle {
- id: mainWnd
- x: 0
- y: 0
- width: 320
- height: 480
- color: "transparent"
+ // Sensor types used
+ //! [1]
+ TiltSensor {
+ id: tilt
+ active: false
+ }
+ //! [1]
+
+ AmbientLightSensor {
+ id: ambientlight
+ active: false
+ //! [5]
+ onReadingChanged: {
+ if (reading.lightLevel == AmbientLightSensor.Unknown)
+ ambientlighttext.text = "Ambient light: Unknown";
+ else if (reading.lightLevel == AmbientLightSensor.Dark)
+ ambientlighttext.text = "Ambient light: Dark";
+ else if (reading.lightLevel == AmbientLightSensor.Twilight)
+ ambientlighttext.text = "Ambient light: Twilight";
+ else if (reading.lightLevel == AmbientLightSensor.Light)
+ ambientlighttext.text = "Ambient light: Light";
+ else if (reading.lightLevel == AmbientLightSensor.Bright)
+ ambientlighttext.text = "Ambient light: Bright";
+ else if (reading.lightLevel == AmbientLightSensor.Sunny)
+ ambientlighttext.text = "Ambient light: Sunny";
+ }
+ //! [5]
+ }
+
+ ProximitySensor {
+ id: proxi
+ active: false
+ }
- property string speed: "Slow"
+ Column {
+ spacing: 10
+ anchors.fill: parent
+ anchors.margins: 5
Text {
id: labelTitle
- anchors.top: mainWnd.top
- anchors.topMargin: 5
- anchors.left: mainWnd.left
- anchors.right: mainWnd.right
-
+ width: parent.width
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 30
font.bold: true
text: "QML QtSensors"
}
- //Tile region
-
- Rectangle {
- id: tiltLine
- anchors.top: labelTitle.bottom
- anchors.topMargin: 5
- anchors.left: mainWnd.left
- anchors.leftMargin: 5
- anchors.right: mainWnd.right
- anchors.rightMargin: 5
- border.width: 1
- height: 1
- border.color: "#888888"
- }
+ // Tilt region
+ Divider { label: "TiltSensor" }
- Text {
- id: labelTilt
- anchors.top: tiltLine.bottom
- anchors.topMargin: 5
- anchors.left: mainWnd.left
- anchors.right: mainWnd.right
-
- horizontalAlignment: Text.AlignHCenter
- font.bold: true
- text: "TiltSensor"
- }
-
-//! [1]
- TiltSensor {
- id: tilt
- active: false
- }
-//! [1]
-
- Rectangle {
+ Row {
+ spacing: 20
+ width: parent.width
+ anchors.margins: 5
Button {
id: calibrate
- anchors.left: mainWnd.left
- anchors.leftMargin: 5
- anchors.top: speedRect.bottom
height: 30
width: 80
text: "Calibrate"
-
- onClicked:{
- tilt.calibrate();
- }
+ onClicked: tilt.calibrate();
}
-
+ Text {
+ id: xrottext
+ height: 30
+ verticalAlignment: Text.AlignVCenter
+ //! [3]
+ text: "X Rotation: " + tilt.xRotation + "°"
+ //! [3]
+ }
+ }
+ Row {
+ spacing: 20
+ width: parent.width
+ anchors.margins: 5
Button {
id: tiltStart
- anchors.top: calibrate.bottom
- anchors.left: mainWnd.left
- anchors.leftMargin: 5
height: 30
width: 80
text: tilt.active ? "Stop" : "Start"
-
- onClicked:{
-//! [2]
+ onClicked: {
+ //! [2]
tilt.active = (tiltStart.text === "Start");
-//! [2]
+ //! [2]
}
}
-
- Text {
- id: xrottext
- anchors.right: mainWnd.right
- anchors.rightMargin: 5
- anchors.left: useRadian.right
- anchors.leftMargin: 15
- anchors.top: useRadian.top
- anchors.bottom: useRadian.bottom
- verticalAlignment: Text.AlignVCenter
-//! [3]
- text: "X Rotation: " + tilt.xRotation + "°"
-//! [3]
- }
-
Text {
id: yrottext
- anchors.right: mainWnd.right
- anchors.rightMargin: 5
- anchors.left: tiltStart.right
- anchors.leftMargin: 15
- anchors.top: tiltStart.top
- anchors.bottom: tiltStart.bottom
+ height: 30
verticalAlignment: Text.AlignVCenter
-//! [4]
+ //! [4]
text: "Y Rotation: " + tilt.yRotation + "°"
-//! [4]
+ //! [4]
}
+ }
- //Ambient Light region
-
- Rectangle {
- id: ambientlightLine
- anchors.top: tiltStart.bottom
- anchors.topMargin: 5
- anchors.left: mainWnd.left
- anchors.leftMargin: 5
- anchors.right: mainWnd.right
- anchors.rightMargin: 5
- border.width: 1
- height: 1
- border.color: "#888888"
- }
-
- Text {
- id: labelAmbientLight
- anchors.top: ambientlightLine.bottom
- anchors.topMargin: 5
- anchors.left: mainWnd.left
- anchors.right: mainWnd.right
-
- horizontalAlignment: Text.AlignHCenter
- font.bold: true
- text: "AmbientLightSensor"
- }
+ Divider { label: "AmbientLightSensor" }
- AmbientLightSensor {
- id: ambientlight
- active: false
-//! [5]
- onReadingChanged: {
- if (reading.lightLevel == AmbientLightSensor.Unknown)
- ambientlighttext.text = "Ambient light: Unknown";
- else if (reading.lightLevel == AmbientLightSensor.Dark)
- ambientlighttext.text = "Ambient light: Dark";
- else if (reading.lightLevel == AmbientLightSensor.Twilight)
- ambientlighttext.text = "Ambient light: Twilight";
- else if (reading.lightLevel == AmbientLightSensor.Light)
- ambientlighttext.text = "Ambient light: Light";
- else if (reading.lightLevel == AmbientLightSensor.Bright)
- ambientlighttext.text = "Ambient light: Bright";
- else if (reading.lightLevel == AmbientLightSensor.Sunny)
- ambientlighttext.text = "Ambient light: Sunny";
- }
-//! [5]
- }
+ Row {
+ spacing: 20
+ width: parent.width
+ anchors.margins: 5
Button{
id: ambientlightStart
- anchors.top: labelAmbientLight.bottom
- anchors.topMargin: 5
- anchors.left: mainWnd.left
- anchors.leftMargin: 5
height: 30
width: 80
text: ambientlight.active ? "Stop" : "Start"
-
onClicked: {
- ambientlight.active = (ambientlightStart.text === "Start" ? true: false);
+ ambientlight.active = (ambientlightStart.text === "Start" ? true : false);
}
}
Text {
id: ambientlighttext
- anchors.left: ambientlightStart.right
- anchors.leftMargin: 15
- anchors.top: ambientlightStart.top
- anchors.bottom: ambientlightStart.bottom
+ height: 30
verticalAlignment: Text.AlignVCenter
- text: "Ambient light: -"
- }
-
- //Proximity region
-
- Rectangle {
- id: proximityLine
- anchors.top: ambientlightStart.bottom
- anchors.topMargin: 5
- anchors.left: mainWnd.left
- anchors.leftMargin: 5
- anchors.right: mainWnd.right
- anchors.rightMargin: 5
- border.width: 1
- height: 1
- border.color: "#888888"
+ text: "Ambient light: Unknown"
}
+ }
- Text {
- id: labelProximityLight
- anchors.top: proximityLine.bottom
- anchors.topMargin: 5
- anchors.left: mainWnd.left
- anchors.right: mainWnd.right
- horizontalAlignment: Text.AlignHCenter
- font.bold: true
- text: "ProximitySensor"
- }
+ // Proximity region
+ Divider { label: "ProximitySensor" }
- ProximitySensor {
- id: proxi
- active: false
- }
+ Row {
+ spacing: 20
+ width: parent.width
+ anchors.margins: 5
- Button{
+ Button {
id: proxiStart
- anchors.top: labelProximityLight.bottom
- anchors.topMargin: 5
- anchors.left: mainWnd.left
- anchors.leftMargin: 5
height: 30
width: 80
text: proxi.active ? "Stop" : "Start"
@@ -331,14 +235,12 @@ ApplicationWindow {
Text {
id: proxitext
- anchors.left: proxiStart.right
- anchors.leftMargin: 15
- anchors.top: proxiStart.top
- anchors.bottom: proxiStart.bottom
+ height: 30
verticalAlignment: Text.AlignVCenter
-//! [6]
- text: "Proximity: " + (proxi.reading.near ? "near" : "far")
-//! [6]
+ //! [6]
+ text: "Proximity: " +
+ (proxi.active ? (proxi.reading.near ? "Near" : "Far") : "Unknown")
+ //! [6]
}
}
}
diff --git a/examples/sensors/qmlqtsensors/qmlqtsensors.qrc b/examples/sensors/qmlqtsensors/qmlqtsensors.qrc
index 2f6630b0..4ba06dad 100644
--- a/examples/sensors/qmlqtsensors/qmlqtsensors.qrc
+++ b/examples/sensors/qmlqtsensors/qmlqtsensors.qrc
@@ -6,5 +6,6 @@
<file>components/images/button_background_disabled.png</file>
<file>components/images/button_background_normal.png</file>
<file>components/images/button_background_pressed.png</file>
+ <file>components/Divider.qml</file>
</qresource>
</RCC>
diff --git a/src/imports/sensors/plugins.qmltypes b/src/imports/sensors/plugins.qmltypes
index 2deff792..f461372f 100644
--- a/src/imports/sensors/plugins.qmltypes
+++ b/src/imports/sensors/plugins.qmltypes
@@ -3,13 +3,16 @@ import QtQuick.tooling 1.1
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
-// This file was auto-generated with the command 'qmlplugindump QtSensors 5.0 /home/thomas/src/qtbase/qml'.
+// This file was auto-generated with the command 'qmlplugindump -notrelocatable QtSensors 5.1'.
Module {
Component {
name: "QmlAccelerometer"
prototype: "QmlSensor"
- exports: ["Accelerometer 5.0", "Accelerometer 5.1"]
+ exports: [
+ "QtSensors/Accelerometer 5.0",
+ "QtSensors/Accelerometer 5.1"
+ ]
exportMetaObjectRevisions: [0, 1]
Enum {
name: "AccelerationMode"
@@ -22,13 +25,18 @@ Module {
Property { name: "accelerationMode"; revision: 1; type: "AccelerationMode" }
Signal {
name: "accelerationModeChanged"
+ revision: 1
Parameter { name: "accelerationMode"; type: "AccelerationMode" }
}
}
Component {
name: "QmlAccelerometerReading"
prototype: "QmlSensorReading"
- exports: ["AccelerometerReading 5.0", "AccelerometerReading 5.1"]
+ exports: [
+ "QtSensors/AccelerometerReading 5.0",
+ "QtSensors/AccelerometerReading 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "x"; type: "double"; isReadonly: true }
Property { name: "y"; type: "double"; isReadonly: true }
Property { name: "z"; type: "double"; isReadonly: true }
@@ -36,57 +44,79 @@ Module {
Component {
name: "QmlAltimeter"
prototype: "QmlSensor"
- exports: ["Altimeter 5.1"]
+ exports: ["QtSensors/Altimeter 5.1"]
+ exportMetaObjectRevisions: [0]
}
Component {
name: "QmlAltimeterReading"
prototype: "QmlSensorReading"
- exports: ["AltimeterReading 5.1"]
+ exports: ["QtSensors/AltimeterReading 5.1"]
+ exportMetaObjectRevisions: [0]
Property { name: "altitude"; type: "double"; isReadonly: true }
}
Component {
name: "QmlAmbientLightSensor"
prototype: "QmlSensor"
- exports: ["AmbientLightSensor 5.0", "AmbientLightSensor 5.1"]
+ exports: [
+ "QtSensors/AmbientLightSensor 5.0",
+ "QtSensors/AmbientLightSensor 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
}
Component {
name: "QmlAmbientLightSensorReading"
prototype: "QmlSensorReading"
- exports: ["AmbientLightReading 5.0", "AmbientLightReading 5.1"]
+ exports: [
+ "QtSensors/AmbientLightReading 5.0",
+ "QtSensors/AmbientLightReading 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "lightLevel"; type: "QAmbientLightReading::LightLevel"; isReadonly: true }
}
Component {
name: "QmlAmbientTemperatureReading"
prototype: "QmlSensorReading"
- exports: ["AmbientTemperatureReading 5.1"]
+ exports: ["QtSensors/AmbientTemperatureReading 5.1"]
+ exportMetaObjectRevisions: [0]
Property { name: "temperature"; type: "double"; isReadonly: true }
}
Component {
name: "QmlAmbientTemperatureSensor"
prototype: "QmlSensor"
- exports: ["AmbientTemperatureSensor 5.1"]
+ exports: ["QtSensors/AmbientTemperatureSensor 5.1"]
+ exportMetaObjectRevisions: [0]
}
Component {
name: "QmlCompass"
prototype: "QmlSensor"
- exports: ["Compass 5.0", "Compass 5.1"]
+ exports: ["QtSensors/Compass 5.0", "QtSensors/Compass 5.1"]
+ exportMetaObjectRevisions: [0, 0]
}
Component {
name: "QmlCompassReading"
prototype: "QmlSensorReading"
- exports: ["CompassReading 5.0", "CompassReading 5.1"]
+ exports: [
+ "QtSensors/CompassReading 5.0",
+ "QtSensors/CompassReading 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "azimuth"; type: "double"; isReadonly: true }
Property { name: "calibrationLevel"; type: "double"; isReadonly: true }
}
Component {
name: "QmlGyroscope"
prototype: "QmlSensor"
- exports: ["Gyroscope 5.0", "Gyroscope 5.1"]
+ exports: ["QtSensors/Gyroscope 5.0", "QtSensors/Gyroscope 5.1"]
+ exportMetaObjectRevisions: [0, 0]
}
Component {
name: "QmlGyroscopeReading"
prototype: "QmlSensorReading"
- exports: ["GyroscopeReading 5.0", "GyroscopeReading 5.1"]
+ exports: [
+ "QtSensors/GyroscopeReading 5.0",
+ "QtSensors/GyroscopeReading 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "x"; type: "double"; isReadonly: true }
Property { name: "y"; type: "double"; isReadonly: true }
Property { name: "z"; type: "double"; isReadonly: true }
@@ -94,29 +124,40 @@ Module {
Component {
name: "QmlHolsterReading"
prototype: "QmlSensorReading"
- exports: ["HolsterReading 5.1"]
+ exports: ["QtSensors/HolsterReading 5.1"]
+ exportMetaObjectRevisions: [0]
Property { name: "holstered"; type: "bool"; isReadonly: true }
}
Component {
name: "QmlHolsterSensor"
prototype: "QmlSensor"
- exports: ["HolsterSensor 5.1"]
+ exports: ["QtSensors/HolsterSensor 5.1"]
+ exportMetaObjectRevisions: [0]
}
Component {
name: "QmlIRProximitySensor"
prototype: "QmlSensor"
- exports: ["IRProximitySensor 5.0", "IRProximitySensor 5.1"]
+ exports: [
+ "QtSensors/IRProximitySensor 5.0",
+ "QtSensors/IRProximitySensor 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
}
Component {
name: "QmlIRProximitySensorReading"
prototype: "QmlSensorReading"
- exports: ["IRProximityReading 5.0", "IRProximityReading 5.1"]
+ exports: [
+ "QtSensors/IRProximityReading 5.0",
+ "QtSensors/IRProximityReading 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "reflectance"; type: "double"; isReadonly: true }
}
Component {
name: "QmlLightSensor"
prototype: "QmlSensor"
- exports: ["LightSensor 5.0", "LightSensor 5.1"]
+ exports: ["QtSensors/LightSensor 5.0", "QtSensors/LightSensor 5.1"]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "fieldOfView"; type: "double"; isReadonly: true }
Signal {
name: "fieldOfViewChanged"
@@ -126,13 +167,15 @@ Module {
Component {
name: "QmlLightSensorReading"
prototype: "QmlSensorReading"
- exports: ["LightReading 5.0", "LightReading 5.1"]
+ exports: ["QtSensors/LightReading 5.0", "QtSensors/LightReading 5.1"]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "illuminance"; type: "double"; isReadonly: true }
}
Component {
name: "QmlMagnetometer"
prototype: "QmlSensor"
- exports: ["Magnetometer 5.0", "Magnetometer 5.1"]
+ exports: ["QtSensors/Magnetometer 5.0", "QtSensors/Magnetometer 5.1"]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "returnGeoValues"; type: "bool" }
Signal {
name: "returnGeoValuesChanged"
@@ -142,7 +185,11 @@ Module {
Component {
name: "QmlMagnetometerReading"
prototype: "QmlSensorReading"
- exports: ["MagnetometerReading 5.0", "MagnetometerReading 5.1"]
+ exports: [
+ "QtSensors/MagnetometerReading 5.0",
+ "QtSensors/MagnetometerReading 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "x"; type: "double"; isReadonly: true }
Property { name: "y"; type: "double"; isReadonly: true }
Property { name: "z"; type: "double"; isReadonly: true }
@@ -151,40 +198,62 @@ Module {
Component {
name: "QmlOrientationSensor"
prototype: "QmlSensor"
- exports: ["OrientationSensor 5.0", "OrientationSensor 5.1"]
+ exports: [
+ "QtSensors/OrientationSensor 5.0",
+ "QtSensors/OrientationSensor 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
}
Component {
name: "QmlOrientationSensorReading"
prototype: "QmlSensorReading"
- exports: ["OrientationReading 5.0", "OrientationReading 5.1"]
+ exports: [
+ "QtSensors/OrientationReading 5.0",
+ "QtSensors/OrientationReading 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "orientation"; type: "QOrientationReading::Orientation"; isReadonly: true }
}
Component {
name: "QmlPressureReading"
prototype: "QmlSensorReading"
- exports: ["PressureReading 5.1"]
+ exports: ["QtSensors/PressureReading 5.1"]
+ exportMetaObjectRevisions: [0]
Property { name: "pressure"; type: "double"; isReadonly: true }
}
Component {
name: "QmlPressureSensor"
prototype: "QmlSensor"
- exports: ["PressureSensor 5.1"]
+ exports: ["QtSensors/PressureSensor 5.1"]
+ exportMetaObjectRevisions: [0]
}
Component {
name: "QmlProximitySensor"
prototype: "QmlSensor"
- exports: ["ProximitySensor 5.0", "ProximitySensor 5.1"]
+ exports: [
+ "QtSensors/ProximitySensor 5.0",
+ "QtSensors/ProximitySensor 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
}
Component {
name: "QmlProximitySensorReading"
prototype: "QmlSensorReading"
- exports: ["ProximityReading 5.0", "ProximityReading 5.1"]
+ exports: [
+ "QtSensors/ProximityReading 5.0",
+ "QtSensors/ProximityReading 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "near"; type: "bool"; isReadonly: true }
}
Component {
name: "QmlRotationSensor"
prototype: "QmlSensor"
- exports: ["RotationSensor 5.0", "RotationSensor 5.1"]
+ exports: [
+ "QtSensors/RotationSensor 5.0",
+ "QtSensors/RotationSensor 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "hasZ"; type: "bool"; isReadonly: true }
Signal {
name: "hasZChanged"
@@ -194,7 +263,11 @@ Module {
Component {
name: "QmlRotationSensorReading"
prototype: "QmlSensorReading"
- exports: ["RotationReading 5.0", "RotationReading 5.1"]
+ exports: [
+ "QtSensors/RotationReading 5.0",
+ "QtSensors/RotationReading 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "x"; type: "double"; isReadonly: true }
Property { name: "y"; type: "double"; isReadonly: true }
Property { name: "z"; type: "double"; isReadonly: true }
@@ -202,7 +275,7 @@ Module {
Component {
name: "QmlSensor"
prototype: "QObject"
- exports: ["Sensor 5.0", "Sensor 5.1"]
+ exports: ["QtSensors/Sensor 5.0", "QtSensors/Sensor 5.1"]
exportMetaObjectRevisions: [0, 1]
Enum {
name: "AxesOrientationMode"
@@ -234,30 +307,37 @@ Module {
Property { name: "bufferSize"; revision: 1; type: "int" }
Signal {
name: "skipDuplicatesChanged"
+ revision: 1
Parameter { name: "skipDuplicates"; type: "bool" }
}
Signal {
name: "axesOrientationModeChanged"
+ revision: 1
Parameter { name: "axesOrientationMode"; type: "AxesOrientationMode" }
}
Signal {
name: "currentOrientationChanged"
+ revision: 1
Parameter { name: "currentOrientation"; type: "int" }
}
Signal {
name: "userOrientationChanged"
+ revision: 1
Parameter { name: "userOrientation"; type: "int" }
}
Signal {
name: "maxBufferSizeChanged"
+ revision: 1
Parameter { name: "maxBufferSize"; type: "int" }
}
Signal {
name: "efficientBufferSizeChanged"
+ revision: 1
Parameter { name: "efficientBufferSize"; type: "int" }
}
Signal {
name: "bufferSizeChanged"
+ revision: 1
Parameter { name: "bufferSize"; type: "int" }
}
Method { name: "start"; type: "bool" }
@@ -266,7 +346,11 @@ Module {
Component {
name: "QmlSensorGesture"
prototype: "QObject"
- exports: ["SensorGesture 5.0", "SensorGesture 5.1"]
+ exports: [
+ "QtSensors/SensorGesture 5.0",
+ "QtSensors/SensorGesture 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "availableGestures"; type: "QStringList"; isReadonly: true }
Property { name: "gestures"; type: "QStringList" }
Property { name: "validGestures"; type: "QStringList"; isReadonly: true }
@@ -280,7 +364,8 @@ Module {
Component {
name: "QmlSensorGlobal"
prototype: "QObject"
- exports: ["QmlSensors 5.0", "QmlSensors 5.1"]
+ exports: ["QtSensors/QmlSensors 5.0", "QtSensors/QmlSensors 5.1"]
+ exportMetaObjectRevisions: [0, 0]
Signal { name: "availableSensorsChanged" }
Method { name: "sensorTypes"; type: "QStringList" }
Method {
@@ -297,7 +382,8 @@ Module {
Component {
name: "QmlSensorOutputRange"
prototype: "QObject"
- exports: ["OutputRange 5.0", "OutputRange 5.1"]
+ exports: ["QtSensors/OutputRange 5.0", "QtSensors/OutputRange 5.1"]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "minimum"; type: "double"; isReadonly: true }
Property { name: "maximum"; type: "double"; isReadonly: true }
Property { name: "accuracy"; type: "double"; isReadonly: true }
@@ -305,20 +391,26 @@ Module {
Component {
name: "QmlSensorRange"
prototype: "QObject"
- exports: ["Range 5.0", "Range 5.1"]
+ exports: ["QtSensors/Range 5.0", "QtSensors/Range 5.1"]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "minimum"; type: "int"; isReadonly: true }
Property { name: "maximum"; type: "int"; isReadonly: true }
}
Component {
name: "QmlSensorReading"
prototype: "QObject"
- exports: ["SensorReading 5.0", "SensorReading 5.1"]
+ exports: [
+ "QtSensors/SensorReading 5.0",
+ "QtSensors/SensorReading 5.1"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "timestamp"; type: "qulonglong"; isReadonly: true }
}
Component {
name: "QmlTapSensor"
prototype: "QmlSensor"
- exports: ["TapSensor 5.0", "TapSensor 5.1"]
+ exports: ["QtSensors/TapSensor 5.0", "QtSensors/TapSensor 5.1"]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "returnDoubleTapEvents"; type: "bool" }
Signal {
name: "returnDoubleTapEventsChanged"
@@ -328,7 +420,8 @@ Module {
Component {
name: "QmlTapSensorReading"
prototype: "QmlSensorReading"
- exports: ["TapReading 5.0", "TapReading 5.1"]
+ exports: ["QtSensors/TapReading 5.0", "QtSensors/TapReading 5.1"]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "tapDirection"; type: "QTapReading::TapDirection"; isReadonly: true }
Property { name: "doubleTap"; type: "bool"; isReadonly: true }
Signal { name: "isDoubleTapChanged" }
@@ -336,13 +429,15 @@ Module {
Component {
name: "QmlTiltSensor"
prototype: "QmlSensor"
- exports: ["TiltSensor 5.0", "TiltSensor 5.1"]
+ exports: ["QtSensors/TiltSensor 5.0", "QtSensors/TiltSensor 5.1"]
+ exportMetaObjectRevisions: [0, 0]
Method { name: "calibrate" }
}
Component {
name: "QmlTiltSensorReading"
prototype: "QmlSensorReading"
- exports: ["TiltReading 5.0", "TiltReading 5.1"]
+ exports: ["QtSensors/TiltReading 5.0", "QtSensors/TiltReading 5.1"]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "yRotation"; type: "double"; isReadonly: true }
Property { name: "xRotation"; type: "double"; isReadonly: true }
}
diff --git a/src/imports/sensors/qmlholstersensor.cpp b/src/imports/sensors/qmlholstersensor.cpp
index a1eae05b..d952e81c 100644
--- a/src/imports/sensors/qmlholstersensor.cpp
+++ b/src/imports/sensors/qmlholstersensor.cpp
@@ -125,7 +125,7 @@ QSensorReading *QmlHolsterReading::reading() const
void QmlHolsterReading::readingUpdate()
{
- qreal holstered = m_sensor->reading()->holstered();
+ const bool holstered = m_sensor->reading()->holstered();
if (m_holstered != holstered) {
m_holstered = holstered;
Q_EMIT holsteredChanged();
diff --git a/src/plugins/sensorgestures/shake/qshakerecognizer.cpp b/src/plugins/sensorgestures/shake/qshakerecognizer.cpp
index b70ad033..7c4133b3 100644
--- a/src/plugins/sensorgestures/shake/qshakerecognizer.cpp
+++ b/src/plugins/sensorgestures/shake/qshakerecognizer.cpp
@@ -158,6 +158,5 @@ bool QShakeSensorGestureRecognizer::checkForShake(AccelData prevSensorData, Acce
return (deltaX > threshold
|| deltaY > threshold
|| deltaZ > threshold);
- (deltaY > threshold && deltaZ > threshold);
}
diff --git a/src/plugins/sensors/sensorfw/sensorfw.pro b/src/plugins/sensors/sensorfw/sensorfw.pro
index 8d67c81f..f875f593 100644
--- a/src/plugins/sensors/sensorfw/sensorfw.pro
+++ b/src/plugins/sensors/sensorfw/sensorfw.pro
@@ -1,5 +1,5 @@
TARGET = qtsensors_sensorfw
-QT = core sensors network
+QT = core sensors network dbus
PLUGIN_TYPE = sensors
load(qt_plugin)
@@ -8,7 +8,7 @@ include(sensorfw.pri)
CONFIG += link_pkgconfig
-PKGCONFIG += sensord
+PKGCONFIG += sensord-qt5
CONFIGFILES.files = Sensors.conf
CONFIGFILES.path = /etc/xdg/QtProject/
diff --git a/src/plugins/sensors/sensorfw/sensorfwaccelerometer.cpp b/src/plugins/sensors/sensorfw/sensorfwaccelerometer.cpp
index ddbaa9c6..4c50faad 100644
--- a/src/plugins/sensors/sensorfw/sensorfwaccelerometer.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwaccelerometer.cpp
@@ -51,6 +51,7 @@ sensorfwaccelerometer::sensorfwaccelerometer(QSensor *sensor)
setDescription(QLatin1String("x, y, and z axes accelerations in m/s^2"));
setRanges(GRAVITY_EARTH_THOUSANDTH);
setReading<QAccelerometerReading>(&m_reading);
+ sensor->setDataRate(50);//set a default rate
}
void sensorfwaccelerometer::slotDataAvailable(const XYZ& data)
diff --git a/src/plugins/sensors/sensorfw/sensorfwals.cpp b/src/plugins/sensors/sensorfw/sensorfwals.cpp
index 811da77f..839c537a 100644
--- a/src/plugins/sensors/sensorfw/sensorfwals.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwals.cpp
@@ -54,6 +54,7 @@ Sensorfwals::Sensorfwals(QSensor *sensor)
setDescription(QLatin1String("ambient light intensity given as 5 pre-defined levels"));
addOutputRange(0, 5, 1);
addDataRate(10,10);
+ sensor->setDataRate(10);//set a default rate
}
void Sensorfwals::start()
diff --git a/src/plugins/sensors/sensorfw/sensorfwals.h b/src/plugins/sensors/sensorfw/sensorfwals.h
index ba7c9af1..63d6443e 100644
--- a/src/plugins/sensors/sensorfw/sensorfwals.h
+++ b/src/plugins/sensors/sensorfw/sensorfwals.h
@@ -46,7 +46,6 @@
#include <qambientlightsensor.h>
#include <alssensor_i.h>
-#include <unsigned.h>
diff --git a/src/plugins/sensors/sensorfw/sensorfwcompass.cpp b/src/plugins/sensors/sensorfw/sensorfwcompass.cpp
index 00741a1f..1fd84417 100644
--- a/src/plugins/sensors/sensorfw/sensorfwcompass.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwcompass.cpp
@@ -50,6 +50,7 @@ SensorfwCompass::SensorfwCompass(QSensor *sensor)
{
initSensor<CompassSensorChannelInterface>(m_initDone);
setReading<QCompassReading>(&m_reading);
+ sensor->setDataRate(50);//set a default rate
}
void SensorfwCompass::slotDataAvailable(const Compass& data)
diff --git a/src/plugins/sensors/sensorfw/sensorfwcompass.h b/src/plugins/sensors/sensorfw/sensorfwcompass.h
index e54c348e..7cc5c43d 100644
--- a/src/plugins/sensors/sensorfw/sensorfwcompass.h
+++ b/src/plugins/sensors/sensorfw/sensorfwcompass.h
@@ -45,7 +45,7 @@
#include <qcompass.h>
#include <compasssensor_i.h>
-#include <compass.h>
+#include <datatypes/compass.h>
diff --git a/src/plugins/sensors/sensorfw/sensorfwgyroscope.cpp b/src/plugins/sensors/sensorfw/sensorfwgyroscope.cpp
index 238993ac..e29b77ef 100644
--- a/src/plugins/sensors/sensorfw/sensorfwgyroscope.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwgyroscope.cpp
@@ -54,6 +54,7 @@ SensorfwGyroscope::SensorfwGyroscope(QSensor *sensor)
setReading<QGyroscopeReading>(&m_reading);
addDataRate(10, 10);
addDataRate(50, 50);
+ sensor->setDataRate(50);//set a default rate
}
void SensorfwGyroscope::slotDataAvailable(const XYZ& data)
diff --git a/src/plugins/sensors/sensorfw/sensorfwirproximitysensor.cpp b/src/plugins/sensors/sensorfw/sensorfwirproximitysensor.cpp
index 865d3760..a2e23493 100644
--- a/src/plugins/sensors/sensorfw/sensorfwirproximitysensor.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwirproximitysensor.cpp
@@ -56,6 +56,7 @@ SensorfwIrProximitySensor::SensorfwIrProximitySensor(QSensor *sensor)
addOutputRange(0, 100, 1);
addDataRate(10,10);
rangeMax = QFile::exists(RM680_PS)?255:1023;
+ sensor->setDataRate(10);//set a default rate
}
void SensorfwIrProximitySensor::slotDataAvailable(const Proximity& proximity)
diff --git a/src/plugins/sensors/sensorfw/sensorfwlightsensor.cpp b/src/plugins/sensors/sensorfw/sensorfwlightsensor.cpp
index b49e7b2d..232d4e8d 100644
--- a/src/plugins/sensors/sensorfw/sensorfwlightsensor.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwlightsensor.cpp
@@ -49,6 +49,7 @@ SensorfwLightSensor::SensorfwLightSensor(QSensor *sensor)
{
initSensor<ALSSensorChannelInterface>(m_initDone);
setReading<QLightReading>(&m_reading);
+ sensor->setDataRate(10);//set a default rate
}
void SensorfwLightSensor::slotDataAvailable(const Unsigned& data)
diff --git a/src/plugins/sensors/sensorfw/sensorfwlightsensor.h b/src/plugins/sensors/sensorfw/sensorfwlightsensor.h
index 83591fae..96df633c 100644
--- a/src/plugins/sensors/sensorfw/sensorfwlightsensor.h
+++ b/src/plugins/sensors/sensorfw/sensorfwlightsensor.h
@@ -47,8 +47,6 @@
#include <qlightsensor.h>
#include <alssensor_i.h>
-#include <unsigned.h>
-
class SensorfwLightSensor : public SensorfwSensorBase
diff --git a/src/plugins/sensors/sensorfw/sensorfwmagnetometer.cpp b/src/plugins/sensors/sensorfw/sensorfwmagnetometer.cpp
index 9778b95c..e4afdd34 100644
--- a/src/plugins/sensors/sensorfw/sensorfwmagnetometer.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwmagnetometer.cpp
@@ -40,6 +40,8 @@
****************************************************************************/
#include "sensorfwmagnetometer.h"
+#include <QSensor>
+
char const * const SensorfwMagnetometer::id("sensorfw.magnetometer");
bool SensorfwMagnetometer::m_initDone = false;
@@ -53,11 +55,14 @@ SensorfwMagnetometer::SensorfwMagnetometer(QSensor *sensor)
setDescription(QLatin1String("magnetic flux density in teslas (T)"));
setRanges(NANO);
setReading<QMagnetometerReading>(&m_reading);
+ sensor->setDataRate(50);//set a default rate
}
void SensorfwMagnetometer::start()
{
- m_isGeoMagnetometer = sensor()->returnGeoValues();
+ QMagnetometer *const magnetometer = qobject_cast<QMagnetometer *>(sensor());
+ if (magnetometer)
+ m_isGeoMagnetometer = magnetometer->returnGeoValues();
SensorfwSensorBase::start();
}
@@ -67,13 +72,13 @@ void SensorfwMagnetometer::slotDataAvailable(const MagneticField& data)
m_reading.setX( NANO * (m_isGeoMagnetometer?data.x():data.rx()));
m_reading.setY( NANO * (m_isGeoMagnetometer?data.y():data.ry()));
m_reading.setZ( NANO * (m_isGeoMagnetometer?data.z():data.rz()));
- m_reading.setCalibrationLevel( m_isGeoMagnetometer?((float) data.level()) / 3.0 :1);
+ m_reading.setCalibrationLevel(m_isGeoMagnetometer?((float) data.level()) / 3.0 :1);
m_reading.setTimestamp(data.timestamp());
newReadingAvailable();
}
-void SensorfwMagnetometer::slotFrameAvailable(const QVector<MagneticField>& frame)
+void SensorfwMagnetometer::slotFrameAvailable(const QVector<MagneticField>& frame)
{
for (int i=0, l=frame.size(); i<l; i++) {
slotDataAvailable(frame.at(i));
@@ -83,8 +88,10 @@ void SensorfwMagnetometer::slotFrameAvailable(const QVector<MagneticField>& fr
bool SensorfwMagnetometer::doConnect()
{
if (m_bufferSize==1)
- return QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const MagneticField&)), this, SLOT(slotDataAvailable(const MagneticField&)));
- return QObject::connect(m_sensorInterface, SIGNAL(frameAvailable(const QVector<MagneticField>& )),this, SLOT(slotFrameAvailable(const QVector<MagneticField>& )));
+ return QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const MagneticField&)),
+ this, SLOT(slotDataAvailable(const MagneticField&)));
+ return QObject::connect(m_sensorInterface, SIGNAL(frameAvailable(const QVector<MagneticField>& )),
+ this, SLOT(slotFrameAvailable(const QVector<MagneticField>& )));
}
QString SensorfwMagnetometer::sensorName() const
diff --git a/src/plugins/sensors/sensorfw/sensorfwmagnetometer.h b/src/plugins/sensors/sensorfw/sensorfwmagnetometer.h
index dff70c09..22d81a8c 100644
--- a/src/plugins/sensors/sensorfw/sensorfwmagnetometer.h
+++ b/src/plugins/sensors/sensorfw/sensorfwmagnetometer.h
@@ -46,7 +46,7 @@
#include <qmagnetometer.h>
#include <magnetometersensor_i.h>
-#include <magneticfield.h>
+#include <datatypes/magneticfield.h>
diff --git a/src/plugins/sensors/sensorfw/sensorfworientationsensor.cpp b/src/plugins/sensors/sensorfw/sensorfworientationsensor.cpp
index 09dfb0eb..6211a45c 100644
--- a/src/plugins/sensors/sensorfw/sensorfworientationsensor.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfworientationsensor.cpp
@@ -41,7 +41,7 @@
#include "sensorfworientationsensor.h"
-#include <posedata.h>
+#include <datatypes/posedata.h>
char const * const SensorfwOrientationSensor::id("sensorfw.orientationsensor");
bool SensorfwOrientationSensor::m_initDone = false;
@@ -51,6 +51,7 @@ SensorfwOrientationSensor::SensorfwOrientationSensor(QSensor *sensor)
{
initSensor<OrientationSensorChannelInterface>(m_initDone);
setReading<QOrientationReading>(&m_reading);
+ sensor->setDataRate(10);//set a default rate
}
diff --git a/src/plugins/sensors/sensorfw/sensorfworientationsensor.h b/src/plugins/sensors/sensorfw/sensorfworientationsensor.h
index 496939ce..7c2ecdf3 100644
--- a/src/plugins/sensors/sensorfw/sensorfworientationsensor.h
+++ b/src/plugins/sensors/sensorfw/sensorfworientationsensor.h
@@ -46,7 +46,6 @@
#include <qorientationsensor.h>
#include <orientationsensor_i.h>
-#include <unsigned.h>
diff --git a/src/plugins/sensors/sensorfw/sensorfwproximitysensor.cpp b/src/plugins/sensors/sensorfw/sensorfwproximitysensor.cpp
index 4602a9a1..1f4c2b54 100644
--- a/src/plugins/sensors/sensorfw/sensorfwproximitysensor.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwproximitysensor.cpp
@@ -50,6 +50,7 @@ SensorfwProximitySensor::SensorfwProximitySensor(QSensor *sensor)
initSensor<ProximitySensorChannelInterface>(m_initDone);
setReading<QProximityReading>(&m_reading);
addDataRate(10,10); //TODO: fix this when we know better
+ sensor->setDataRate(10);//set a default rate
}
void SensorfwProximitySensor::start()
diff --git a/src/plugins/sensors/sensorfw/sensorfwproximitysensor.h b/src/plugins/sensors/sensorfw/sensorfwproximitysensor.h
index 91800c2e..404e66a9 100644
--- a/src/plugins/sensors/sensorfw/sensorfwproximitysensor.h
+++ b/src/plugins/sensors/sensorfw/sensorfwproximitysensor.h
@@ -46,7 +46,6 @@
#include <qproximitysensor.h>
#include <proximitysensor_i.h>
-#include <unsigned.h>
diff --git a/src/plugins/sensors/sensorfw/sensorfwrotationsensor.cpp b/src/plugins/sensors/sensorfw/sensorfwrotationsensor.cpp
index d5774022..1971e92e 100644
--- a/src/plugins/sensors/sensorfw/sensorfwrotationsensor.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwrotationsensor.cpp
@@ -49,7 +49,10 @@ SensorfwRotationSensor::SensorfwRotationSensor(QSensor *sensor)
{
initSensor<RotationSensorChannelInterface>(m_initDone);
setReading<QRotationReading>(&m_reading);
- sensor()->setHasZ(true);
+ QRotationSensor *const rotationSensor = qobject_cast<QRotationSensor *>(sensor);
+ if (rotationSensor)
+ rotationSensor->setHasZ(true);
+ sensor->setDataRate(20);//set a default rate
}
void SensorfwRotationSensor::slotDataAvailable(const XYZ& data)
diff --git a/src/plugins/sensors/sensorfw/sensorfwrotationsensor.h b/src/plugins/sensors/sensorfw/sensorfwrotationsensor.h
index 5b5556df..d6b056b4 100644
--- a/src/plugins/sensors/sensorfw/sensorfwrotationsensor.h
+++ b/src/plugins/sensors/sensorfw/sensorfwrotationsensor.h
@@ -47,7 +47,7 @@
#include <qrotationsensor.h>
#include <rotationsensor_i.h>
-#include <xyz.h>
+#include <datatypes/xyz.h>
diff --git a/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp b/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp
index 85968e22..b41d6308 100644
--- a/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp
@@ -73,7 +73,7 @@ void SensorfwSensorBase::start()
if (m_sensorInterface) {
// dataRate
QByteArray type = sensor()->type();
- if (type != QTapSensor::type() && type != QProximitySensor::type()) {
+ if (type != QTapSensor::type && type != QProximitySensor::type) {
int dataRate = sensor()->dataRate();
int interval = dataRate > 0 ? 1000 / dataRate : 0;
// for testing maximum speed
diff --git a/src/plugins/sensors/sensorfw/sensorfwsensorbase.h b/src/plugins/sensors/sensorfw/sensorfwsensorbase.h
index 78a6c14f..1c2aa0e0 100644
--- a/src/plugins/sensors/sensorfw/sensorfwsensorbase.h
+++ b/src/plugins/sensors/sensorfw/sensorfwsensorbase.h
@@ -47,6 +47,11 @@
#include <sensormanagerinterface.h>
#include <abstractsensor_i.h>
+#include <QAmbientLightSensor>
+#include <QIRProximitySensor>
+#include <QTapSensor>
+#include <QProximitySensor>
+
class SensorfwSensorBase : public QSensorBackend
{
public:
@@ -137,11 +142,11 @@ protected:
m_maxBufferSize = 1;
sensor()->setMaxBufferSize(m_maxBufferSize);
- sensor()->efficientBufferSize(m_efficientBufferSize);
+ sensor()->setEfficientBufferSize(m_efficientBufferSize);
QByteArray type = sensor()->type();
- if (type == QAmbientLightSensor::type()) return; // SensorFW returns lux values, plugin enumerated values
- if (type == QIRProximitySensor::type()) return; // SensorFW returns raw reflectance values, plugin % of max reflectance
+ if (type == QAmbientLightSensor::type) return; // SensorFW returns lux values, plugin enumerated values
+ if (type == QIRProximitySensor::type) return; // SensorFW returns raw reflectance values, plugin % of max reflectance
if (name == "accelerometersensor") return; // SensorFW returns milliGs, plugin m/s^2
if (name == "magnetometersensor") return; // SensorFW returns nanoTeslas, plugin Teslas
if (name == "gyroscopesensor") return; // SensorFW returns DSPs, plugin milliDSPs
diff --git a/src/plugins/sensors/sensorfw/sensorfwtapsensor.cpp b/src/plugins/sensors/sensorfw/sensorfwtapsensor.cpp
index c945ac11..d5539de8 100644
--- a/src/plugins/sensors/sensorfw/sensorfwtapsensor.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwtapsensor.cpp
@@ -51,15 +51,18 @@ SensorfwTapSensor::SensorfwTapSensor(QSensor *sensor)
setReading<QTapReading>(&m_reading);
addOutputRange(QTapReading::Undefined, QTapReading::Z_Both, 1);
addDataRate(10,10); //TODO: fix this when we know better
+ sensor->setDataRate(10);//set a default rate
}
void SensorfwTapSensor::start()
{
- bool b = sensor()->returnDoubleTapEvents();
+ QTapSensor * const tapSensor = qobject_cast<QTapSensor *>(sensor());
+
+ bool b = tapSensor->returnDoubleTapEvents();
bool isDoubleTapSensor = m_isDoubleTapSensor;
if (!b) {
- sensor()->setReturnDoubleTapEvents(true); //by default doubles
+ tapSensor->setReturnDoubleTapEvents(true); //by default doubles
m_isDoubleTapSensor = true;
}
else m_isDoubleTapSensor = b;
diff --git a/src/plugins/sensors/sensorfw/sensorfwtapsensor.h b/src/plugins/sensors/sensorfw/sensorfwtapsensor.h
index 6df3bcfb..c577bde8 100644
--- a/src/plugins/sensors/sensorfw/sensorfwtapsensor.h
+++ b/src/plugins/sensors/sensorfw/sensorfwtapsensor.h
@@ -45,7 +45,7 @@
#include <qtapsensor.h>
#include <tapsensor_i.h>
-#include <tap.h>
+#include <datatypes/tap.h>
diff --git a/src/sensors/doc/src/qtsensors.qdoc b/src/sensors/doc/src/qtsensors.qdoc
index 9213371d..1b818c8b 100644
--- a/src/sensors/doc/src/qtsensors.qdoc
+++ b/src/sensors/doc/src/qtsensors.qdoc
@@ -29,7 +29,6 @@
\page qtsensors-index.html
\title Qt Sensors
\brief The Qt Sensors API provides access to sensors via QML and C++ interfaces.
- \ingroup technology-apis
The Qt Sensors API provides access to sensor hardware via QML and C++ interfaces.
The Qt Sensors API also provides motion gesture recognition API for devices.
@@ -117,4 +116,3 @@
\li Information about the Sensorfw sensor backend.
\endtable
*/
-
diff --git a/src/sensors/doc/src/sensor-examples.qdoc b/src/sensors/doc/src/sensor-examples.qdoc
index d934c8a0..1dd58529 100644
--- a/src/sensors/doc/src/sensor-examples.qdoc
+++ b/src/sensors/doc/src/sensor-examples.qdoc
@@ -33,8 +33,4 @@
These are the Qt Sensors examples.
- \generatelist related
*/
-
-
-
diff --git a/sync.profile b/sync.profile
index 9aa73579..666e42ed 100644
--- a/sync.profile
+++ b/sync.profile
@@ -4,8 +4,8 @@
%moduleheaders = ( # restrict the module headers to those found in relative path
);
%dependencies = (
- "qtbase" => "refs/heads/dev",
- "qtxmlpatterns" => "refs/heads/dev",
- "qtdeclarative" => "refs/heads/dev",
- "qtjsbackend" => "refs/heads/dev",
+ "qtbase" => "",
+ "qtxmlpatterns" => "",
+ "qtdeclarative" => "",
+ "qtjsbackend" => "",
);