summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorWolfgang Beck <wolfgang.beck@nokia.com>2011-10-14 11:14:01 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-14 03:34:01 +0200
commit6f3a14a73e5f74de8f7f365fb2736e065254930f (patch)
tree38a87388e18c183032e52b73d8f17b7929c3a8a5 /examples
parent3d9fa0cf5aaf51fa4fd234c3d9aa11e11a4a74d2 (diff)
MTMW-347 Replace dataRate with speed in TltSensor
Change-Id: Icdca79436d1fe0f0e7f5035ab1e27bc958a9e517 Reviewed-on: http://codereview.qt-project.org/6634 Reviewed-by: Wolfgang Beck <wolfgang.beck@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/sensors/qmlqtsensors5/main.qml62
1 files changed, 55 insertions, 7 deletions
diff --git a/examples/sensors/qmlqtsensors5/main.qml b/examples/sensors/qmlqtsensors5/main.qml
index a1144d8c..e93e8825 100644
--- a/examples/sensors/qmlqtsensors5/main.qml
+++ b/examples/sensors/qmlqtsensors5/main.qml
@@ -43,13 +43,13 @@ import QtQuick 2.0
import QtSensors 5.0
/* Layout
- tiltrect
- /
------------------------------------------------------------/
+ tiltrect
+ /
+----------------------------------------------------------------------------/
| Accuracy <----- textAccuracy
-| @ 0 Degree <- selButton0DegreeAccuracy
-| O 1 Degree <- selButton1DegreeAccuracy
-| O 5 Degree <- selButton5DegreeAccuracy
+| @ 0 Degree <- selButton0DegreeAccuracy @ Slow <- selButtonSlowSpeed
+| O 1 Degree <- selButton1DegreeAccuracy O Medium <- selButtonMediumSpeed
+| O 5 Degree <- selButton5DegreeAccuracy O Fast <- selButtonFastSpeed
| -----------
| |calibrate| <------------------ calibrate
| -----------
@@ -73,7 +73,7 @@ import QtSensors 5.0
| ---------
| |start | <-------------------- proxiStart
| ---------
-------------------------------------------------------------
+------------------------------------------------------------------------------
*/
@@ -95,12 +95,21 @@ Rectangle {
enabled: false
accuracy: 1.0
}
+
Text{
id: textAccuracy
x: 5
y: 20
text: "Accuracy"
}
+
+ Text{
+ id: textSpeed
+ x: 150
+ y: 20
+ text: "Speed"
+ }
+
SelectionButton{
id: selButton0DegreeAccuracy
x: 5
@@ -114,6 +123,19 @@ Rectangle {
}
}
SelectionButton{
+ id: selButtonSlowSpeed
+ x: 150
+ y: 45
+ checked: true
+ text: "Slow"
+ onClicked:{
+ selButtonMediumSpeed.setCheck(false);
+ selButtonFastSpeed.setCheck(false);
+ tilt.speed = TiltSensor.Slow;
+ }
+ }
+
+ SelectionButton{
id: selButton1DegreeAccuracy
x: 5
y: 70
@@ -126,6 +148,19 @@ Rectangle {
}
}
SelectionButton{
+ id: selButtonMediumSpeed
+ x: 150
+ y: 70
+ checked: false
+ text: "Medium"
+ onClicked:{
+ selButtonSlowSpeed.setCheck(false);
+ selButtonFastSpeed.setCheck(false);
+ tilt.speed = TiltSensor.Medium;
+ }
+ }
+
+ SelectionButton{
id: selButton5DegreeAccuracy
x: 5
y: 95
@@ -138,6 +173,19 @@ Rectangle {
}
}
+ SelectionButton{
+ id: selButtonFastSpeed
+ x: 150
+ y: 95
+ checked: false
+ text: "Fast"
+ onClicked:{
+ selButtonSlowSpeed.setCheck(false);
+ selButtonMediumSpeed.setCheck(false);
+ tilt.speed = TiltSensor.Fast;
+ }
+ }
+
Button{
id: calibrate
x: 5