From 34bac34d5d1e7d95120ab745e2be42dd3cdccef5 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 12 Oct 2017 13:51:47 -0400 Subject: Add the beginnings of the root desktop QML system. Not finished yet. --- src-qt5/src-cpp/RootDesktopObject.cpp | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src-qt5/src-cpp/RootDesktopObject.cpp (limited to 'src-qt5/src-cpp/RootDesktopObject.cpp') diff --git a/src-qt5/src-cpp/RootDesktopObject.cpp b/src-qt5/src-cpp/RootDesktopObject.cpp new file mode 100644 index 00000000..088c88b7 --- /dev/null +++ b/src-qt5/src-cpp/RootDesktopObject.cpp @@ -0,0 +1,44 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "RootDesktopObject.h" + +// === PUBLIC === +RootDesktopObject::RootDesktopObject(QObject *parent = 0){ + updateScreens(); //make sure the internal list is updated right away +} + +RootDesktopObject::~RootDesktopObject(){ + +} + +static RootDesktopObject* RootDesktopObject::instance(){ + static RootDesktopObject* r_obj = new RootDesktopObject(); + return r_obj; +} + +//QML Read Functions +QList RootDesktopObject::screens(){ + return ; +} + +// === PUBLIC SLOTS === +void RootDesktopObject::updateScreens(){ + QList scrns = QApplication::screens(); + QList tmp; //copy of the internal array initially + for(int i=0; ideleteLater(); } + s_objects = tmp; +} + +// === PRIVATE === -- cgit