From be7850a7e808e48cf7ddcdf6f6bc9f80c0d5c331 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 18 Aug 2015 10:34:24 -0400 Subject: Update the lumina theme engine/class so that custom environment variables may be set/loaded for all apps using the theme engine (including the session - which propagates to new non-lumina applications as well) --- libLumina/LuminaThemes.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'libLumina/LuminaThemes.h') diff --git a/libLumina/LuminaThemes.h b/libLumina/LuminaThemes.h index 3767eb7a..6dcff89d 100644 --- a/libLumina/LuminaThemes.h +++ b/libLumina/LuminaThemes.h @@ -17,6 +17,7 @@ #include #include #include +#include class LTHEME{ public: @@ -46,11 +47,18 @@ public: //Additional info for a cursor theme static QStringList cursorInformation(QString name); //returns: [Name, Comment, Sample Image File] + //Environment settings + static QStringList CustomEnvSettings(); //view all the key=value settings + static void LoadCustomEnvSettings(); //will push the custom settings into the environment (recommended before loading the initial QApplication) + static bool setCustomEnvSetting(QString var, QString val); //variable/value pair (use an empty val to clear it) + static QString readCustomEnvSetting(QString var); + }; //Simple class to setup a utility to use the Lumina theme //-----Example usage in "main.cpp" ------------------------------- +// LTHEME::LoadCustomEnvSettings(); // QApplication a(argc,argv); // LuminaThemeEngine themes(&a) //------------------------------------------------------------------------------------ @@ -71,15 +79,16 @@ private: QFileSystemWatcher *watcher; QString theme,colors,icons, font, fontsize, cursors; //current settings QTimer *syncTimer; + QDateTime lastcheck; private slots: void watcherChange(); void reloadFiles(); signals: - void updateIcons(); - void updateCursors(); -}; - + void updateIcons(); //Icon theme changed + void updateCursors(); //Cursor theme changed + void EnvChanged(); //Some environment variable(s) changed +}; #endif -- cgit