summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/popuphelper.cpp
authorharlekin <harlekin>2002-07-20 23:54:44 (UTC)
committer harlekin <harlekin>2002-07-20 23:54:44 (UTC)
commit76d7938ec6b89aa11f54f9fbdad40bb358b4886a (patch) (unidiff)
tree0dfa86240e9674cefa489d85ac4841a94d43e175 /noncore/net/opietooth/manager/popuphelper.cpp
parent594dfd3535846a536cebdb3381f4858239404c49 (diff)
downloadopie-76d7938ec6b89aa11f54f9fbdad40bb358b4886a.zip
opie-76d7938ec6b89aa11f54f9fbdad40bb358b4886a.tar.gz
opie-76d7938ec6b89aa11f54f9fbdad40bb358b4886a.tar.bz2
update
Diffstat (limited to 'noncore/net/opietooth/manager/popuphelper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/popuphelper.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/noncore/net/opietooth/manager/popuphelper.cpp b/noncore/net/opietooth/manager/popuphelper.cpp
index 4ef1ed5..ba91e04 100644
--- a/noncore/net/opietooth/manager/popuphelper.cpp
+++ b/noncore/net/opietooth/manager/popuphelper.cpp
@@ -8,23 +8,28 @@ using namespace OpieTooth;
8PopupHelper::PopupHelper() { 8PopupHelper::PopupHelper() {
9 init(); 9 init();
10} 10}
11
11PopupHelper::~PopupHelper() { 12PopupHelper::~PopupHelper() {
12 13
13} 14}
15
14void PopupHelper::insert( int id, popupFactory fact ) { 16void PopupHelper::insert( int id, popupFactory fact ) {
15 m_map.insert(id, fact ); 17 m_map.insert(id, fact );
16} 18}
19
17QPopupMenu* PopupHelper::find( int id, const Services& ser, QListViewItem* item ) { 20QPopupMenu* PopupHelper::find( int id, const Services& ser, QListViewItem* item ) {
18 //qWarning("find"); 21 //qWarning("find");
19 FactoryMap::Iterator it = m_map.find(id ); 22 FactoryMap::Iterator it = m_map.find(id );
20 if ( it != m_map.end() ) { 23 if ( it != m_map.end() ) {
21 //qWarning("found"); 24 //qWarning("found");
22 popupFactory fact = it.data(); 25 popupFactory fact = it.data();
23 return (*fact)(ser, item); 26 return (*fact)(ser, item);
24 } 27 }
25 return 0l; 28 return 0l;
26} 29}
30
27void PopupHelper::init() { 31void PopupHelper::init() {
28 insert( 1, newRfcComPopup ); 32 insert( 4355, newRfcComPopup );
29 insert(2, newObexPushPopup ); 33 insert( 4353, newRfcComPopup );
34 insert( 3, newObexPushPopup );
30} 35}