aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core-utils/lumina-config/pages/PageWidget.h
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-06-22 15:28:49 -0400
committerKen Moore <moorekou@gmail.com>2016-06-22 15:28:49 -0400
commit49065b25b2e41e3cfc7037e1459c9c33ab94d6d4 (patch)
tree7966904cb9e209037372bc08f15c3ecdf3faf24c /src-qt5/core-utils/lumina-config/pages/PageWidget.h
parentAdd the backtrace of the dbus crash on Qt 5.6.1 (diff)
downloadlumina-49065b25b2e41e3cfc7037e1459c9c33ab94d6d4.tar.gz
lumina-49065b25b2e41e3cfc7037e1459c9c33ab94d6d4.tar.bz2
lumina-49065b25b2e41e3cfc7037e1459c9c33ab94d6d4.zip
Continue splitting up all the various pages/tabs into distinct pages for lumina-config. All the UI files are now split up - starting to add in the cpp/h files now.
(Still not tied into build yet)
Diffstat (limited to 'src-qt5/core-utils/lumina-config/pages/PageWidget.h')
-rw-r--r--src-qt5/core-utils/lumina-config/pages/PageWidget.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/PageWidget.h b/src-qt5/core-utils/lumina-config/pages/PageWidget.h
new file mode 100644
index 00000000..9eb7d847
--- /dev/null
+++ b/src-qt5/core-utils/lumina-config/pages/PageWidget.h
@@ -0,0 +1,54 @@
+//===========================================
+// Lumina Desktop Source Code
+// Copyright (c) 2016, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+#ifndef _LUMINA_CONFIG_PAGE_WIDGET_UI_H
+#define _LUMINA_CONFIG_PAGE_WIDGET_UI_H
+#include "../globals.h"
+//===============================
+// NOTES FOR CREATING SUBPAGES
+//===============================
+// 1) Subclass this PageWidget for any client page
+// 2) Init any internal widgets/classes in the constructor
+// 3) Make sure you handle the [Save/Load]Settings functions (LoadSettings() will be called automatially after widget creation)
+// 4) Make sure to emit the signals as needed for interactivity with the main container
+//===============================
+
+//Structure of all information needed for a page
+struct PAGEINFO{
+ QString name, title, icon, comment, category, id;
+ QStringList req_systems, search_tags;
+};
+
+//Main widget class needed to show a configuration page
+class PageWidget : public QWidget{
+ Q_OBJECT
+public:
+
+ //Main constructor/destructor (create/destroy any interface items)
+ PageWidget(QWidget *parent) : QWidget(parent){}
+ ~PageWidget(){}
+
+signals:
+ //emit this when the page has changes which are waiting to be saved
+ void HasPendingChanges(bool);
+ //emit this when the page title changes (will updates main UI as needed)
+ void ChangePageTitle(QString);
+ //emit this when we need to change to another client/page (if needed - generally only used for the base/group pages)
+ void ChangePage(QString); //ID of new page to open
+
+public slots:
+ //User requested to save any pending changes
+ virtual void SaveSettings(){}
+ virtual void LoadSettings(int){} //INPUT: Screen number (0+)
+ virtual void updateIcons();
+
+ //Simplification function for widget connections
+ void settingChanged(){
+ emit HasPendingChanged(true);
+ }
+};
+
+#endif
bgstack15