From 71737f70949bd25f9aa8bc4e7d03039ba83c6cb1 Mon Sep 17 00:00:00 2001 From: Kris Moore Date: Thu, 4 Sep 2014 11:42:13 -0400 Subject: Initial import of the lumina code from pcbsd git repo --- lumina-desktop/panel-plugins/NewPP.h | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 lumina-desktop/panel-plugins/NewPP.h (limited to 'lumina-desktop/panel-plugins/NewPP.h') diff --git a/lumina-desktop/panel-plugins/NewPP.h b/lumina-desktop/panel-plugins/NewPP.h new file mode 100644 index 00000000..c378f07e --- /dev/null +++ b/lumina-desktop/panel-plugins/NewPP.h @@ -0,0 +1,56 @@ +//=========================================== +// 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 interface to load all the different panel plugins +//=========================================== +#ifndef _LUMINA_DESKTOP_NEW_PANEL_PLUGIN_H +#define _LUMINA_DESKTOP_NEW_PANEL_PLUGIN_H + +#include + +//List all the individual plugin includes here +#include "LPPlugin.h" +#include "userbutton/LUserButton.h" +#include "desktopbar/LDeskBar.h" +#include "spacer/LSpacer.h" +#include "clock/LClock.h" +#include "battery/LBattery.h" +#include "desktopswitcher/LDesktopSwitcher.h" +#include "taskmanager/LTaskManagerPlugin.h" +#include "systemdashboard/LSysDashboard.h" +#include "systemtray/LSysTray.h" //must be last due to X11 compile issues + +class NewPP{ +public: + static LPPlugin* createPlugin(QString plugin, QWidget* parent = 0, bool horizontal = true){ + LPPlugin *plug = 0; + if(plugin.startsWith("userbutton---")){ + plug = new LUserButtonPlugin(parent, plugin, horizontal); + }else if(plugin.startsWith("desktopbar---")){ + plug = new LDeskBarPlugin(parent, plugin, horizontal); + }else if(plugin.startsWith("spacer---")){ + plug = new LSpacerPlugin(parent, plugin, horizontal); + }else if(plugin.startsWith("taskmanager---")){ + plug = new LTaskManagerPlugin(parent, plugin, horizontal); + }else if(plugin.startsWith("systemtray---")){ + plug = new LSysTray(parent, plugin, horizontal); + }else if(plugin.startsWith("desktopswitcher---")){ + plug = new LDesktopSwitcher(parent, plugin, horizontal); + }else if(plugin.startsWith("battery---")){ + plug = new LBattery(parent, plugin, horizontal); + }else if(plugin.startsWith("clock---")){ + plug = new LClock(parent, plugin, horizontal); + }else if(plugin.startsWith("systemdashboard---")){ + plug = new LSysDashboard(parent, plugin, horizontal); + }else{ + qWarning() << "Invalid Panel Plugin:"<