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.qml71
1 files changed, 30 insertions, 41 deletions
diff --git a/wayland/democompositor/qml/Screen.qml b/wayland/democompositor/qml/Screen.qml
index 34fd090..65df18f 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.kill(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: {
@@ -189,7 +202,9 @@ WaylandOutput {
}
onSlideTrigger: {
//console.log("slide " + winItem + " : " + winItem.shellSurface.surface)
- winItem.shellSurface.surface.client.close()
+ winItem.appEntry == null ?
+ winItem.shellSurface.surface.client.close() :
+ launcher.stop(winItem.appEntry, 5000);
}
}
Rectangle {
@@ -252,46 +267,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 {