Diffstat (limited to 'noncore/net/opietooth/manager/popuphelper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/popuphelper.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/popuphelper.cpp b/noncore/net/opietooth/manager/popuphelper.cpp new file mode 100644 index 0000000..2a6dad0 --- a/dev/null +++ b/noncore/net/opietooth/manager/popuphelper.cpp | |||
@@ -0,0 +1,25 @@ | |||
1 | |||
2 | #include "popuphelper.h" | ||
3 | |||
4 | using namespace OpieTooth; | ||
5 | |||
6 | PopupHelper::PopupHelper() { | ||
7 | init(); | ||
8 | } | ||
9 | PopupHelper::~PopupHelper() { | ||
10 | |||
11 | } | ||
12 | void PopupHelper::insert( int id, popupFactory fact ) { | ||
13 | m_map.insert(id, fact ); | ||
14 | } | ||
15 | QPopupMenu* PopupHelper::find( int id ) { | ||
16 | FactoryMap::Iterator it = m_map.find(id ); | ||
17 | if ( it != m_map.end() ) { | ||
18 | popupFactory fact = it.data(); | ||
19 | return (*fact)(); | ||
20 | } | ||
21 | return 0l; | ||
22 | } | ||
23 | void PopupHelper::init() { | ||
24 | |||
25 | } | ||