author | zecke <zecke> | 2002-07-09 18:28:19 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-07-09 18:28:19 (UTC) |
commit | 411ac6f9199b1aae2b6a40e7a8cf6bfea260acba (patch) (unidiff) | |
tree | 218836d6509d2dcaba3c6306f9f488b759169b1a /noncore/net/opietooth/manager/popuphelper.h | |
parent | 5f549398401acc5591ffcb67459dbf55ea323b91 (diff) | |
download | opie-411ac6f9199b1aae2b6a40e7a8cf6bfea260acba.zip opie-411ac6f9199b1aae2b6a40e7a8cf6bfea260acba.tar.gz opie-411ac6f9199b1aae2b6a40e7a8cf6bfea260acba.tar.bz2 |
Add a generic class for the sensitive QPopupMenu
Diffstat (limited to 'noncore/net/opietooth/manager/popuphelper.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/popuphelper.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/popuphelper.h b/noncore/net/opietooth/manager/popuphelper.h new file mode 100644 index 0000000..7485f71 --- a/dev/null +++ b/noncore/net/opietooth/manager/popuphelper.h | |||
@@ -0,0 +1,25 @@ | |||
1 | |||
2 | #ifndef OPIE_TOOTH_POPUP_HELPER | ||
3 | #define OPIE_TOOTH_POPUP_HELPER | ||
4 | |||
5 | #include <qpopupmenu.h> | ||
6 | #include <qmap.h> | ||
7 | |||
8 | |||
9 | namespace OpieTooth { | ||
10 | typedef QPopupMenu* (*popupFactory)(void); | ||
11 | typedef QMap<int, popupFactory> FactoryMap; | ||
12 | class PopupHelper { | ||
13 | public: | ||
14 | PopupHelper(); | ||
15 | ~PopupHelper(); | ||
16 | void insert( int id, popupFactory fact ); | ||
17 | QPopupMenu* find( int id ); | ||
18 | private: | ||
19 | void init(); | ||
20 | FactoryMap m_map; | ||
21 | |||
22 | }; | ||
23 | }; | ||
24 | |||
25 | #endif | ||