aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/desktop-plugins/LDPlugin.h
diff options
context:
space:
mode:
authorKris Moore <kris@pcbsd.org>2014-09-04 11:42:13 -0400
committerKris Moore <kris@pcbsd.org>2014-09-04 11:42:13 -0400
commit71737f70949bd25f9aa8bc4e7d03039ba83c6cb1 (patch)
treeab29e864d1ae59d10cc6875af9541e3ad306b2fb /lumina-desktop/desktop-plugins/LDPlugin.h
parentInitial commit (diff)
downloadlumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.gz
lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.bz2
lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.zip
Initial import of the lumina code from pcbsd git repo
Diffstat (limited to 'lumina-desktop/desktop-plugins/LDPlugin.h')
-rw-r--r--lumina-desktop/desktop-plugins/LDPlugin.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/lumina-desktop/desktop-plugins/LDPlugin.h b/lumina-desktop/desktop-plugins/LDPlugin.h
new file mode 100644
index 00000000..e8a1f5f3
--- /dev/null
+++ b/lumina-desktop/desktop-plugins/LDPlugin.h
@@ -0,0 +1,59 @@
+//===========================================
+// Lumina-DE source code
+// Copyright (c) 2014, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// This class is the generic container layout for all desktop plugins
+// Simply subclass this when creating a new plugin to enable correct
+// visibility and usage within the desktop window
+//===========================================
+// WARNING: Do *not* setup a custom context menu for plugins!
+// This can prevent access to the general desktop context menu if
+// the plugin was maximized to fill the desktop area!
+//===========================================
+#ifndef _LUMINA_DESKTOP_DESKTOP_PLUGIN_H
+#define _LUMINA_DESKTOP_DESKTOP_PLUGIN_H
+
+#include <QObject>
+#include <QWidget>
+#include <QString>
+#include <QDebug>
+#include <QSettings>
+#include <QMoveEvent>
+#include <QResizeEvent>
+
+class LDPlugin : public QWidget{
+ Q_OBJECT
+
+private:
+ QString PLUGID;
+
+public:
+ QSettings *settings;
+
+ LDPlugin(QWidget *parent = 0, QString id="unknown") : QWidget(parent){
+ PLUGID=id;
+ settings = new QSettings("desktop-plugins",PLUGID);
+ }
+
+ ~LDPlugin(){
+ delete settings;
+ }
+
+ QString ID(){
+ return PLUGID;
+ }
+
+public slots:
+ virtual void LocaleChange(){
+ //This needs to be re-implemented in the subclassed plugin
+ //This is where all text is set/translated
+ }
+ virtual void ThemeChange(){
+ //This needs to be re-implemented in the subclassed plugin
+ //This is where all the visuals are set if using Theme-dependant icons.
+ }
+};
+
+#endif \ No newline at end of file
bgstack15