00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __tom_h_
00020 #define __tom_h_
00021
00022 #include <tqpixmap.h>
00023
00024 #include <kpanelmenu.h>
00025 #include <klibloader.h>
00026
00027 class KPopupMenu;
00028 class TQPopupMenu;
00029
00030 typedef TQPtrList<TQPopupMenu> PopupMenuList;
00031 typedef TQMap<int, KService::Ptr> TaskMap;
00032
00033 class TOM : public KPanelMenu
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 TOM(TQWidget *parent = 0, const char *name = 0);
00039 ~TOM();
00040
00041
00042
00043
00044
00045
00046
00047 protected slots:
00048 void slotClear();
00049 void slotExec(int);
00050
00051 void initialize();
00052 void contextualizeRMBmenu(KPopupMenu* menu, int menuItem, TQPopupMenu* ctxMenu);
00053
00054 void clearRecentDocHistory();
00055 void runCommand();
00056 void runTask(int id);
00057 void initializeRecentDocs();
00058 void openRecentDocument(int id);
00059 void logout();
00060
00061
00062
00063
00064 void removeTask();
00065
00066 protected:
00067 void reload();
00068
00069 int appendTaskGroup(KConfig& config, bool inSubMenu = true );
00070 void initializeRecentApps(TQPopupMenu* menu);
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 PopupMenuList m_submenus;
00088 TQFont m_largerFont;
00089 int m_maxIndex;
00090 bool m_isImmutable;
00091 bool m_detailedTaskEntries;
00092 bool m_detailedNamesFirst;
00093 TaskMap m_tasks;
00094 KPopupMenu* m_recentDocsMenu;
00095 TQStringList m_recentDocURLs;
00096 };
00097
00098 class TOMFactory : public KLibFactory
00099 {
00100 public:
00101 TOMFactory(TQObject *parent = 0, const char *name = 0);
00102
00103 protected:
00104 TQObject* createObject(TQObject *parent = 0, const char *name = 0,
00105 const char *classname = "TQObject",
00106 const TQStringList& args = TQStringList());
00107 };
00108
00109
00110 #endif