diff options
author | Robert Griebl <robert.griebl@pelagicore.com> | 2016-04-13 19:13:39 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2016-04-15 09:44:19 +0000 |
commit | 4b8fafddeb15e3dd92d5343eb045e7fa7198bde7 (patch) | |
tree | f6aba21951881f4585f7d9b162e3246d955d6d31 | |
parent | 30be2c12ec59f5850f73f4a83054ef52e5bfaa6b (diff) | |
download | neptune-ui-4b8fafddeb15e3dd92d5343eb045e7fa7198bde7.tar.gz |
Cleanup and smaller fixes
- all Windows have titles now (this helps a lot with debugging)
- the minimum supported Qt version was already 5.5 (QtQuick 2.5), but the
import was still stating QtQuick 2.1
- added a global shortcut to return to the system-ui via Esc
Change-Id: If6616e0a8e4cda5e30f250a2d2821e805ae8c7f7
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
-rw-r--r-- | Main.qml | 2 | ||||
-rw-r--r-- | MainWithCluster.qml (renamed from ClusterAndHUD.qml) | 16 | ||||
-rw-r--r-- | apps/com.pelagicore.browser/Browser.qml | 1 | ||||
-rw-r--r-- | apps/com.pelagicore.movies/Movies.qml | 2 | ||||
-rw-r--r-- | apps/com.pelagicore.music/Music.qml | 1 | ||||
-rw-r--r-- | sysui/LaunchController.qml | 27 |
6 files changed, 27 insertions, 22 deletions
@@ -29,7 +29,7 @@ ** ****************************************************************************/ -import QtQuick 2.1 +import QtQuick 2.5 import QtQuick.Window 2.2 import "sysui" import controls 1.0 diff --git a/ClusterAndHUD.qml b/MainWithCluster.qml index 3bfa13f..ba7abf8 100644 --- a/ClusterAndHUD.qml +++ b/MainWithCluster.qml @@ -41,7 +41,7 @@ Main { Window { id: cluster - title: "CSD" + title: "Neptune Cluster Display" height: 720 width: 1920 visible: false @@ -49,17 +49,17 @@ Main { color: "black" Cluster {} + + Component.onCompleted: { + WindowManager.registerOutputWindow(cluster) + Style.withCluster = true + ScreenManager.setScreen(cluster, 1) + cluster.show() + } } Window.onActiveChanged: { if (Window.active && !WindowManager.runningOnDesktop) cluster.requestActivate() } - - Component.onCompleted: { - WindowManager.registerOutputWindow(cluster) - Style.withCluster = true - ScreenManager.setScreen(cluster, 1) - cluster.show() - } } diff --git a/apps/com.pelagicore.browser/Browser.qml b/apps/com.pelagicore.browser/Browser.qml index 78ed20d..85ea1e0 100644 --- a/apps/com.pelagicore.browser/Browser.qml +++ b/apps/com.pelagicore.browser/Browser.qml @@ -37,6 +37,7 @@ import utils 1.0 AppUIScreen { id: root + title: "Neptune Browser" UIScreen { WebBrowser { diff --git a/apps/com.pelagicore.movies/Movies.qml b/apps/com.pelagicore.movies/Movies.qml index fcdf0a3..a6fdbcf 100644 --- a/apps/com.pelagicore.movies/Movies.qml +++ b/apps/com.pelagicore.movies/Movies.qml @@ -36,6 +36,8 @@ import controls 1.0 AppUIScreen { id: root + title: "Neptune Movie Player" + StackView { id: stack anchors.fill: parent diff --git a/apps/com.pelagicore.music/Music.qml b/apps/com.pelagicore.music/Music.qml index 08c950f..5843ce5 100644 --- a/apps/com.pelagicore.music/Music.qml +++ b/apps/com.pelagicore.music/Music.qml @@ -37,6 +37,7 @@ import "." AppUIScreen { id: root + title: "Neptune Music Player" onClusterKeyPressed: { if (key === Qt.Key_Down) { diff --git a/sysui/LaunchController.qml b/sysui/LaunchController.qml index 1f1c037..b8c0987 100644 --- a/sysui/LaunchController.qml +++ b/sysui/LaunchController.qml @@ -29,7 +29,7 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.5 import QtQuick.Controls 1.0 import controls 1.0 import utils 1.0 @@ -45,7 +45,6 @@ StackView { height: Style.vspan(24) focus: true - property int windowItemIndex: -1 property Item windowItem: null property variant blackListItems: [] @@ -179,7 +178,6 @@ StackView { if (acceptSurface) { root.windowItem = item - root.windowItemIndex = index WindowManager.setSurfaceWindowProperty(item, "windowType", "fullScreen") WindowManager.setSurfaceWindowProperty(item, "visibility", true) @@ -215,14 +213,12 @@ StackView { } function getSurfaceIndex(item) { - var appIndex = -1 for (var i = 0; i < WindowManager.count; i++) { if (WindowManager.get(i).surfaceItem === item) { - appIndex = i - break + return i } } - return appIndex + return -1 } Connections { @@ -231,13 +227,13 @@ StackView { //print(":::LaunchController::: WindowManager:surfaceWindowPropertyChanged", surfaceItem, name, value) if (name === "visibility" && value === false) { root.pop(null) - var id = root.getSurfaceIndex(root.windowItem) + var index = root.getSurfaceIndex(root.windowItem) if (ApplicationManager.dummy) { - if (WindowManager.get(id).categories === "navigation") + if (WindowManager.get(index).categories === "navigation") WindowManager.setSurfaceWindowProperty(root.windowItem, "windowType", "widget") } else { - if (ApplicationManager.get(WindowManager.get(id).applicationId).categories[0] === "navigation") { + if (ApplicationManager.get(WindowManager.get(index).applicationId).categories[0] === "navigation") { // Sending after pop transition is done WindowManager.setSurfaceWindowProperty(root.windowItem, "windowType", "widget") } @@ -268,9 +264,9 @@ StackView { } } else if (name === "goTo" && value === "fullScreen") { - var appIndex = root.getSurfaceIndex(surfaceItem) - //print(":::LaunchController::: App found. Going to full screen the app ", appIndex, WindowManager.get(appIndex).applicationId) - ApplicationManager.startApplication(WindowManager.get(appIndex).applicationId) + index = root.getSurfaceIndex(surfaceItem) + //print(":::LaunchController::: App found. Going to full screen the app ", index, WindowManager.get(index).applicationId) + ApplicationManager.startApplication(WindowManager.get(index).applicationId) WindowManager.setSurfaceWindowProperty(surfaceItem, "goTo", "") } else if (name === "liveDriveEvent") { @@ -318,4 +314,9 @@ StackView { } } + Shortcut { + context: Qt.ApplicationShortcut + sequence: StandardKey.Cancel + onActivated: { root.pop(null) } + } } |