aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-11-27 09:55:06 +0000
committerWeblate <noreply@weblate.org>2017-11-27 09:55:06 +0000
commit152a57c8c2844d63f95803128b216c8ab722e6e2 (patch)
tree0ce13eccbf6ef36df43d4c558657c9699f757d20 /src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp
parentTranslated using Weblate (Spanish) (diff)
parentremove file manager dev folder (diff)
downloadlumina-152a57c8c2844d63f95803128b216c8ab722e6e2.tar.gz
lumina-152a57c8c2844d63f95803128b216c8ab722e6e2.tar.bz2
lumina-152a57c8c2844d63f95803128b216c8ab722e6e2.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp15
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h5
2 files changed, 16 insertions, 4 deletions
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 9842712e..60cf56c3 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
@@ -32,8 +32,19 @@ RootDesktopObject* RootDesktopObject::instance(){
}
//QML Read Functions
-QList<ScreenObject*> RootDesktopObject::screens(){
- return s_objects;
+QStringList RootDesktopObject::screens(){
+ qDebug() << "Request Screens:" << s_objects.length();
+ QStringList names;
+ for(int i=0; i<s_objects.length(); i++){ names << s_objects[i]->name(); }
+ return names;
+}
+
+ScreenObject* RootDesktopObject::screen(QString id){
+ qDebug() << "Got Screen Request:" << id;
+ for(int i=0; i<s_objects.length(); i++){
+ if(s_objects[i]->name()==id){ return s_objects[i]; }
+ }
+ return 0;
}
void RootDesktopObject::logout(){
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h
index dd7c7ab3..ba586701 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h
@@ -16,7 +16,7 @@
class RootDesktopObject : public QObject{
Q_OBJECT
//Define all the QML Properties here (interface between QML and the C++ methods below)
- Q_PROPERTY( QList<ScreenObject*> screens READ screens NOTIFY screensChanged)
+ Q_PROPERTY( QStringList screens READ screens NOTIFY screensChanged)
public:
//main contructor/destructor
@@ -29,7 +29,8 @@ public:
static RootDesktopObject* instance();
//QML Read Functions
- QList<ScreenObject*> screens();
+ QStringList screens();
+ Q_INVOKABLE ScreenObject* screen(QString id);
//QML Access Functions
Q_INVOKABLE void logout();
bgstack15