00001 /***************************************************************** 00002 00003 Copyright (c) 1996-2000 the kicker authors. See file AUTHORS. 00004 00005 Permission is hereby granted, free of charge, to any person obtaining a copy 00006 of this software and associated documentation files (the "Software"), to deal 00007 in the Software without restriction, including without limitation the rights 00008 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00009 copies of the Software, and to permit persons to whom the Software is 00010 furnished to do so, subject to the following conditions: 00011 00012 The above copyright notice and this permission notice shall be included in 00013 all copies or substantial portions of the Software. 00014 00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00016 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00017 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00018 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00019 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00020 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00021 00022 ******************************************************************/ 00023 00024 #ifndef PANEL_CLIENTMENU_H 00025 #define PANEL_CLIENTMENU_H 00026 00027 #include <tqstringlist.h> 00028 #include <tqpopupmenu.h> 00029 00030 #include <dcopobject.h> 00031 00032 00033 class PanelKMenu; 00034 00035 // Classes to handle client application menus. Used by PanelKButton, which 00036 // also manages the toplevel K Button Menu. 00037 00041 class KickerClientMenu : public TQPopupMenu, DCOPObject 00042 { 00043 Q_OBJECT 00044 public: 00045 KickerClientMenu( TQWidget *parent=0, const char *name=0); 00046 ~KickerClientMenu(); 00047 00048 // dcop exported 00049 void clear(); 00050 void insertItem( TQPixmap icon, TQString text, int id ); 00051 void insertItem( TQString text, int id ); 00052 00053 TQCString insertMenu( TQPixmap icon, TQString test, int id ); 00054 00055 // dcop signals: 00056 // void activated(int) 00057 00058 void connectDCOPSignal( TQCString signal, TQCString appId, TQCString objId ); 00059 00060 // dcop internal 00061 virtual bool process(const TQCString &fun, const TQByteArray &data, 00062 TQCString &replyType, TQByteArray &reply); 00063 00064 protected slots: 00065 void slotActivated(int id); 00066 00067 private: 00068 TQCString app, obj; // for the signal 00069 00070 // for the panel menu, internal 00071 friend class PanelKMenu; 00072 TQString text; 00073 TQPixmap icon; 00074 00075 // for the KickerClientMenu, internal 00076 friend class MenuManager; 00077 int idInParentMenu; 00078 TQCString createdBy; 00079 }; 00080 00081 #endif
1.6.1