summaryrefslogtreecommitdiffstats
path: root/wayland/democompositor/qml/Screen.qml
diff options
context:
space:
mode:
Diffstat (limited to 'wayland/democompositor/qml/Screen.qml')
-rw-r--r--wayland/democompositor/qml/Screen.qml67
1 files changed, 27 insertions, 40 deletions
diff --git a/wayland/democompositor/qml/Screen.qml b/wayland/democompositor/qml/Screen.qml
index 34fd090..ef3be4d 100644
--- a/wayland/democompositor/qml/Screen.qml
+++ b/wayland/democompositor/qml/Screen.qml
@@ -53,11 +53,13 @@ import QtQuick.Window 2.2
import QtWayland.Compositor 1.0
import com.theqtcompany.wlprocesslauncher 1.0
+import com.theqtcompany.wlapplistmodel 1.0
WaylandOutput {
id: output
property alias surfaceArea: background
+ property alias appLauncher: launcher
property var windowList: [ ]
property int hiddenWindowCount
@@ -85,6 +87,17 @@ WaylandOutput {
id: launcher
}
+ AppListModel {
+ id: apps
+ onAppRemoved: {
+ console.log("Application was removed: " + appEntry.appName);
+ launcher.stop(appEntry);
+ }
+ }
+
+ Component.onCompleted: {
+ apps.addAndWatchDir("/data/user/democompositor/apps/")
+ }
Rectangle {
id: curtain
@@ -176,7 +189,7 @@ WaylandOutput {
pressedColor: pressedCol
text.maximumLineCount: 1
- text.text: modelData.shellSurface.title.length > 0 ? modelData.shellSurface.title : "Untitled"
+ text.text: winItem.appEntry === null ? "Untitled" : winItem.appEntry.appName
text.elide: Text.ElideRight
text.color: textCol
onTriggered: {
@@ -252,46 +265,20 @@ WaylandOutput {
height: 5
width: 1
}
- LaunchButton {
- height: 60
- width: sidebar.width - 10
- buttonColor: backgroundCol
- pressedColor: pressedCol
- textColor: textCol
- text.text: "Clocks"
- executable: "./clocks"
- icon.source: "qrc:/images/Icon_Clocks.png"
- }
- LaunchButton {
- height: 60
- width: sidebar.width - 10
- buttonColor: backgroundCol
- pressedColor: pressedCol
- textColor: textCol
- text.text: "RSS News"
- executable: "./rssnews"
- icon.source: "qrc:/images/Icon_RSS.png"
- }
- LaunchButton {
- height: 60
- width: sidebar.width - 10
- buttonColor: backgroundCol
- pressedColor: pressedCol
- textColor: textCol
- text.text: "StoQt"
- executable: "./stocqt"
- icon.source: "qrc:/images/Icon_StocQt.png"
- }
- LaunchButton {
- height: 60
- width: sidebar.width - 10
- buttonColor: backgroundCol
- pressedColor: pressedCol
- textColor: textCol
- text.text: "Maps"
- executable: "./qml_location_mapviewer"
- icon.source: "qrc:/images/Icon_Maps.png"
+ Repeater {
+ model: apps
+
+ LaunchButton {
+ height: 60
+ width: sidebar.width - 10
+ buttonColor: backgroundCol
+ pressedColor: pressedCol
+ textColor: textCol
+ text.text: model.applicationName
+ appEntry: model.appEntry
+ icon.source: model.iconName
+ }
}
TimedButton {