From 9fe1845f0e2d75dc8a6d3d49fac6780b394b0067 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 8 Jan 2018 14:19:58 -0500 Subject: Another large update to Lumina 2: Starting to hook up the new QML window frame with the C++ backend. --- .../src-desktop/src-cpp/RootDesktopObject.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp') diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp index 4b01fa0d..39dc30c1 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp @@ -27,6 +27,7 @@ void RootDesktopObject::RegisterType(){ qmlRegisterType("Lumina.Backend.RootDesktopObject", 2, 0, "RootDesktopObject"); //Also register any types that are needed by this class ScreenObject::RegisterType(); + NativeWindowObject::RegisterType(); } RootDesktopObject* RootDesktopObject::instance(){ @@ -36,14 +37,14 @@ RootDesktopObject* RootDesktopObject::instance(){ //QML Read Functions QStringList RootDesktopObject::screens(){ - qDebug() << "Request Screens:" << s_objects.length(); + //qDebug() << "Request Screens:" << s_objects.length(); QStringList names; for(int i=0; iname(); } return names; } ScreenObject* RootDesktopObject::screen(QString id){ - qDebug() << "Got Screen Request:" << id; + //qDebug() << "Got Screen Request:" << id; for(int i=0; iname()==id){ return s_objects[i]; } } @@ -72,7 +73,7 @@ QStringList RootDesktopObject::windows(){ return names; } -NativeWindow* RootDesktopObject::window(QString id){ +NativeWindowObject* RootDesktopObject::window(QString id){ //qDebug() << "Got Panel Request:" << id; WId chk = id.toInt(); //numerical ID's in this case for(int i=0; i list){ emit panelsChanged(); } -void RootDesktopObject::setWindows(QList list){ +void RootDesktopObject::setWindows(QList list){ window_objects = list; emit windowsChanged(); } @@ -103,6 +104,10 @@ void RootDesktopObject::mousePositionChanged(){ emit mouseMoved(); } +void RootDesktopObject::launchApp(QString appOrPath){ + emit launchApplication(appOrPath); +} + // === PUBLIC SLOTS === void RootDesktopObject::updateScreens(){ QList scrns = QApplication::screens(); -- cgit