Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

popuphelper.cpp

Go to the documentation of this file.
00001 
00002 #include "stdpopups.h"
00003 #include "popuphelper.h"
00004 
00005 using namespace OpieTooth;
00006 
00007 PopupHelper::PopupHelper() {
00008     init();
00009 }
00010 
00011 PopupHelper::~PopupHelper() {
00012 }
00013 
00014 void PopupHelper::insert( int id, popupFactory fact ) {
00015     m_map.insert(id, fact );
00016 }
00017 
00018 QPopupMenu* PopupHelper::find( int id, const Services& ser, BTDeviceItem* item ) {
00019     //owarn << "find" << oendl; 
00020     FactoryMap::Iterator it = m_map.find(id );
00021     if ( it != m_map.end() ) {
00022         //owarn << "found" << oendl; 
00023         popupFactory fact = it.data();
00024         return (*fact)(ser, item);
00025     }
00026     return 0l;
00027 }
00028 
00029 void PopupHelper::init() {
00030     insert( 4355, newRfcComPopup );
00031     insert( 4354, newDunPopup );
00032     insert( 4353, newRfcComPopup );
00033     insert( 4357, newObexPushPopup );
00034     insert( 4358, newObexPushPopup );
00035     insert( 4374, newPanPopup );
00036 }

Generated on Sat Nov 5 16:17:44 2005 for OPIE by  doxygen 1.4.2