diff options
author | Ken Moore <ken@ixsystems.com> | 2017-10-13 14:00:14 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-10-13 14:00:14 -0400 |
commit | 27992c407e1d67b14c7d20aa378193d5590b1d52 (patch) | |
tree | 0a7b10db476e55a9d1e21bb0a32fdbc542daaf06 /src-qt5/src-qml/RootDesktop.qml | |
parent | Add the beginnings of the root desktop QML system. Not finished yet. (diff) | |
download | lumina-27992c407e1d67b14c7d20aa378193d5590b1d52.tar.gz lumina-27992c407e1d67b14c7d20aa378193d5590b1d52.tar.bz2 lumina-27992c407e1d67b14c7d20aa378193d5590b1d52.zip |
Another checkpoint commit - almost ready to start running tests with QML for the desktop background/wallpapers
Diffstat (limited to 'src-qt5/src-qml/RootDesktop.qml')
-rw-r--r-- | src-qt5/src-qml/RootDesktop.qml | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src-qt5/src-qml/RootDesktop.qml b/src-qt5/src-qml/RootDesktop.qml index d4d7fed7..0003366b 100644 --- a/src-qt5/src-qml/RootDesktop.qml +++ b/src-qt5/src-qml/RootDesktop.qml @@ -13,15 +13,40 @@ // RootDesktopObject *rootobj = new RootDesktopObject(); // QQuickView *root = new QQuickView(); // root->setResizeMode(QQuickView::SizeRootObjectToView); -// root->engine()->rootContext->setContextProperty("RootObject", rootobj); +// root->engine()->rootContext()->setContextProperty("RootObject", rootobj); //=========================================== import QtQuick 2.0 import QtQuick.Window 2.2 +import Lumina.Backend.RootDesktopObject 2.0 +import Lumina.Backend.ScreenObject 2.0 + Rectangle { id: RootCanvas color: "black" + //Setup the right-click context menu + MouseArea { + anchors.fill: RootCanvas + acceptedButton: Qt.RightButton + onClicked: { contextMenu.open() } + } + + //Create the context menu itself + Menu { + id: contextMenu + + MenuItem { + test: qtTr("Logout") + indicator: Image{ + asynchronous: true + autoTransform: true + source: "image://theme/system-logout" + } + onTriggered: RootObject.logout() + } + } + //Setup the wallpapers Repeater{ model: RootObject.screens |