aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/src-cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-02-02 15:07:12 -0500
committerKen Moore <ken@ixsystems.com>2018-02-02 15:07:12 -0500
commit42c516b6907c041d46838ac808c9587baf7d1d9b (patch)
tree85582f93ab29c6361f80d5c9134ece6a122bfcc2 /src-qt5/src-cpp
parentAdd a new "Clock_Digital" plugin (diff)
downloadlumina-42c516b6907c041d46838ac808c9587baf7d1d9b.tar.gz
lumina-42c516b6907c041d46838ac808c9587baf7d1d9b.tar.bz2
lumina-42c516b6907c041d46838ac808c9587baf7d1d9b.zip
Add a new "Spacer" plugin, and tinker with a lot of the panel mechanics.
Trying to get things organized properly on the panels
Diffstat (limited to 'src-qt5/src-cpp')
-rw-r--r--src-qt5/src-cpp/framework-OSInterface.h2
-rw-r--r--src-qt5/src-cpp/framework-OSInterface_private.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/src-qt5/src-cpp/framework-OSInterface.h b/src-qt5/src-cpp/framework-OSInterface.h
index debc6c05..7f51764b 100644
--- a/src-qt5/src-cpp/framework-OSInterface.h
+++ b/src-qt5/src-cpp/framework-OSInterface.h
@@ -60,6 +60,7 @@ class OSInterface : public QObject{
//Updates
Q_PROPERTY( QString updateStatus READ updateStatus NOTIFY updateStatusChanged)
Q_PROPERTY( QString updateIcon READ updateIcon NOTIFY updateStatusChanged)
+ Q_PROPERTY( bool updateInfoAvailable READ updateInfoAvailable NOTIFY updateStatusChanged)
//Power options
Q_PROPERTY( bool canReboot READ canReboot NOTIFY powerAvailableChanged)
@@ -111,6 +112,7 @@ public:
// = Updates =
Q_INVOKABLE bool updatesSupported(); //is thie subsystem supported for the OS?
Q_INVOKABLE QString updateStatus(); //Current status ["","available","running","finished"]
+ Q_INVOKABLE bool updateInfoAvailable();
Q_INVOKABLE QString updateIcon();
Q_INVOKABLE QString updateStatusInfo(); //Extra information corresponding to the current status
Q_INVOKABLE QString updateDetails(); //Information about any available updates
diff --git a/src-qt5/src-cpp/framework-OSInterface_private.cpp b/src-qt5/src-cpp/framework-OSInterface_private.cpp
index 96356268..15ee6f8e 100644
--- a/src-qt5/src-cpp/framework-OSInterface_private.cpp
+++ b/src-qt5/src-cpp/framework-OSInterface_private.cpp
@@ -625,6 +625,9 @@ QString OSInterface::updateStatus(){
if(INFO.contains("updates/status")){ return INFO.value("updates/status").toString(); }
return "";
}
+bool OSInterface::updateInfoAvailable(){
+ return !updateStatus().isEmpty();
+}
QString OSInterface::updateIcon(){
if(INFO.contains("updates/icon")){ return INFO.value("updates/icon").toString(); }
bgstack15