summaryrefslogtreecommitdiff
path: root/rockwork/qml/Main.qml
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2016-02-17 20:41:52 +0100
committerAndrew Branson <andrew.branson@cern.ch>2016-02-17 20:41:52 +0100
commit0f3d090bd1dc9a6b912eb0b1e587602573304b4a (patch)
treeaa52d58d9ba119d20d491a37595c3fa4f3458980 /rockwork/qml/Main.qml
parent07fb609095291f8d8544441925dea3d60d636f87 (diff)
First attempt at QML hacking.
Main and ServiceControl adapted. Project files
Diffstat (limited to 'rockwork/qml/Main.qml')
-rw-r--r--rockwork/qml/Main.qml20
1 files changed, 6 insertions, 14 deletions
diff --git a/rockwork/qml/Main.qml b/rockwork/qml/Main.qml
index 2bdece3..aae852b 100644
--- a/rockwork/qml/Main.qml
+++ b/rockwork/qml/Main.qml
@@ -1,26 +1,17 @@
-import QtQuick 2.4
-import QtQuick.Layouts 1.1
-import Ubuntu.Components 1.3
-import RockWork 1.0
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+import RockPool 1.0
/*!
\brief MainView with a Label and Button elements.
*/
-MainView {
- applicationName: "rockwork.mzanetti"
-
- width: units.gu(40)
- height: units.gu(70)
+ApplicationWindow {
+ id: app
ServiceController {
id: serviceController
- serviceName: "rockworkd"
Component.onCompleted: {
- if (!serviceController.serviceFileInstalled) {
- print("Service file not installed. Installing now.")
- serviceController.installServiceFile();
- }
if (!serviceController.serviceRunning) {
print("Service not running. Starting now.")
serviceController.startService();
@@ -41,6 +32,7 @@ MainView {
pageStack.clear()
if (pebbles.count == 1) {
pageStack.push(Qt.resolvedUrl("MainMenuPage.qml"), {pebble: pebbles.get(0)})
+ app.cover.replace(Qt.resolvedUrl("CoverPage.qml"), {pebble: pebbles.get(0)})
} else {
pageStack.push(Qt.resolvedUrl("PebblesPage.qml"))
}