diff options
author | Kris Moore <kris@pcbsd.org> | 2014-09-04 11:42:13 -0400 |
---|---|---|
committer | Kris Moore <kris@pcbsd.org> | 2014-09-04 11:42:13 -0400 |
commit | 71737f70949bd25f9aa8bc4e7d03039ba83c6cb1 (patch) | |
tree | ab29e864d1ae59d10cc6875af9541e3ad306b2fb /lumina-desktop/panel-plugins/taskmanager/LTaskButton.h | |
parent | Initial commit (diff) | |
download | lumina-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/panel-plugins/taskmanager/LTaskButton.h')
-rw-r--r-- | lumina-desktop/panel-plugins/taskmanager/LTaskButton.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h new file mode 100644 index 00000000..22278eba --- /dev/null +++ b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h @@ -0,0 +1,64 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2014, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#ifndef _LUMINA_DESKTOP_TASK_BUTTON_H +#define _LUMINA_DESKTOP_TASK_BUTTON_H + +// Qt includes +#include <QWidget> +#include <QList> +#include <QIcon> +#include <QCursor> +#include <QMenu> +#include <QEvent> +#include <QAction> + +// libLumina includes +#include <LuminaXDG.h> +#include <LuminaX11.h> + +// Local includes +#include "LWinInfo.h" +#include "../LTBWidget.h" + +class LTaskButton : public LTBWidget{ + Q_OBJECT +public: + LTaskButton(QWidget *parent=0); + ~LTaskButton(); + + //Window Information + QList<LWinInfo> windows(); + QString classname(); + + //Window Management + void addWindow(LWinInfo win); //Add a window to this button + void rmWindow(LWinInfo win); //Remove a window from this button + +private: + QList<LWinInfo> WINLIST; + QList<LWinInfo> LWINLIST; + QMenu *actMenu; // action menu (custom context menu) + QMenu *winMenu; // window menu (if more than 1) + LWinInfo cWin; + QString cname; //class name for the entire button + bool noicon; + + LWinInfo currentWindow(); //For getting the currently-active window + +public slots: + void UpdateButton(); //re-sync the current window infomation + void UpdateMenus(); //re-create the menus (text + icons) + +private slots: + void buttonClicked(); + void closeWindow(); //send the signal to close a window + void triggerWindow(); //change b/w visible and invisible + void winClicked(QAction*); + void openActionMenu(); + +}; +#endif |