00001 00002 #ifndef OPIE_TOOTH_POPUP_HELPER 00003 #define OPIE_TOOTH_POPUP_HELPER 00004 00005 #include <qlistview.h> 00006 #include <qpopupmenu.h> 00007 #include <qmap.h> 00008 00009 #include <services.h> 00010 00011 namespace OpieTooth { 00012 typedef QPopupMenu* (*popupFactory)(const Services&, BTDeviceItem*); 00013 typedef QMap<int, popupFactory> FactoryMap; 00014 class PopupHelper { 00015 public: 00016 PopupHelper(); 00017 ~PopupHelper(); 00018 void insert( int id, popupFactory fact ); 00019 QPopupMenu* find( int id, const Services&, BTDeviceItem* ); 00020 private: 00021 void init(); 00022 FactoryMap m_map; 00023 00024 }; 00025 }; 00026 00027 #endif
1.4.2