summaryrefslogtreecommitdiffstats
path: root/basicsuite/Sensors/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'basicsuite/Sensors/main.qml')
-rw-r--r--basicsuite/Sensors/main.qml65
1 files changed, 0 insertions, 65 deletions
diff --git a/basicsuite/Sensors/main.qml b/basicsuite/Sensors/main.qml
deleted file mode 100644
index 90d1dcd..0000000
--- a/basicsuite/Sensors/main.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-import QtQuick 2.0
-import QtSensors 5.0
-import QtSensors 5.0 as Sensors
-
-Item {
- id: root
- width: 800
- height: 1280
-
- Component {
- id: sensorExample
- Rectangle {
- id: main
- width: root.height
- height: root.width
- rotation: 90
- border.width: 1
- Light {
- id: lys
- width: main.width
- height: main.height / 2
- }
-
- Accelbubble {
- width: main.width
- height: main.height / 2
- anchors.top: lys.bottom
- }
- }
- }
-
- Component {
- id: message
- Rectangle {
- width: root.width
- height: root.height
- Text {
- font.pixelSize: 22
- anchors.centerIn: parent
- text: "It appears that this device doesn't provide the required sensors!"
- }
- }
- }
-
- Loader {
- id: pageLoader
- anchors.centerIn: parent
- }
-
- Component.onCompleted: {
- var typesList = Sensors.QmlSensors.sensorTypes();
- var count = 0
- for (var i = 0; i < typesList.length; ++i) {
- if (typesList[i] == "QAccelerometer")
- count++
- if (typesList[i] == "QLightSensor")
- count++
- }
-
- if (count > 1)
- pageLoader.sourceComponent = sensorExample
- else
- pageLoader.sourceComponent = message
- }
-}