//=========================================== // 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 #include #include #include #include #include #include // libLumina includes #include #include // Local includes #include "../../LWinInfo.h" #include "../LTBWidget.h" class LTaskButton : public LTBWidget{ Q_OBJECT public: LTaskButton(QWidget *parent=0, bool smallDisplay = true); ~LTaskButton(); //Window Information QList 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 WINLIST; QList 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, showText; 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