00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef KICKER_MENU_MANAGER_H
00025 #define KICKER_MENU_MANAGER_H
00026
00027 #include <dcopobject.h>
00028 #include <tqvaluelist.h>
00029
00030 class PanelKMenu;
00031 class KMenu;
00032 class KickerClientMenu;
00033 class KMenuStub;
00034 class PanelPopupButton;
00035
00036 typedef TQValueList<PanelPopupButton*> KButtonList;
00037
00041 class MenuManager : public TQObject, DCOPObject
00042 {
00043 Q_OBJECT
00044 public:
00045 static MenuManager* the();
00046
00047
00048 TQCString createMenu(TQPixmap icon, TQString text);
00049 void removeMenu(TQCString menu);
00050
00051
00052 bool process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &reply);
00053
00054
00055 KMenuStub* kmenu() { return m_kmenu; }
00056 void popupKMenu(const TQPoint &p);
00057
00058 void registerKButton(PanelPopupButton *button);
00059 void unregisterKButton(PanelPopupButton *button);
00060 PanelPopupButton* findKButtonFor(TQWidget* menu);
00061 ~MenuManager();
00062
00063 public slots:
00064 void slotSetKMenuItemActive();
00065 void kmenuAccelActivated();
00066
00067 protected slots:
00068 void applicationRemoved(const TQCString&);
00069
00070 protected:
00071 KMenuStub* m_kmenu;
00072 typedef TQValueList<KickerClientMenu*> ClientMenuList;
00073 ClientMenuList clientmenus;
00074
00075 private:
00076 MenuManager(TQObject *parent = 0);
00077
00078 static MenuManager* m_self;
00079 KButtonList m_kbuttons;
00080 };
00081
00082 #endif