From 411ac6f9199b1aae2b6a40e7a8cf6bfea260acba Mon Sep 17 00:00:00 2001 From: zecke Date: Tue, 09 Jul 2002 18:28:19 +0000 Subject: Add a generic class for the sensitive QPopupMenu --- (limited to 'noncore/net/opietooth/manager/popuphelper.cpp') 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 @@ + +#include "popuphelper.h" + +using namespace OpieTooth; + +PopupHelper::PopupHelper() { + init(); +} +PopupHelper::~PopupHelper() { + +} +void PopupHelper::insert( int id, popupFactory fact ) { + m_map.insert(id, fact ); +} +QPopupMenu* PopupHelper::find( int id ) { + FactoryMap::Iterator it = m_map.find(id ); + if ( it != m_map.end() ) { + popupFactory fact = it.data(); + return (*fact)(); + } + return 0l; +} +void PopupHelper::init() { + +} -- cgit v0.9.0.2