Diffstat (limited to 'noncore/apps/opie-console/metafactory.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/metafactory.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/metafactory.cpp b/noncore/apps/opie-console/metafactory.cpp index bef6ec7..754f34c 100644 --- a/noncore/apps/opie-console/metafactory.cpp +++ b/noncore/apps/opie-console/metafactory.cpp | |||
@@ -1,44 +1,58 @@ | |||
1 | 1 | #include <qpe/config.h> | |
2 | #include "metafactory.h" | 2 | #include "metafactory.h" |
3 | 3 | ||
4 | MetaFactory::MetaFactory() { | 4 | MetaFactory::MetaFactory() { |
5 | } | 5 | } |
6 | MetaFactory::~MetaFactory() { | 6 | MetaFactory::~MetaFactory() { |
7 | 7 | ||
8 | } | 8 | } |
9 | void MetaFactory::addConfigWidgetFactory( const QString& str, | 9 | void MetaFactory::addConfigWidgetFactory( const QString& str, |
10 | configWidget wid) { | 10 | configWidget wid) { |
11 | m_confFact.insert( str, wid ); | 11 | m_confFact.insert( str, wid ); |
12 | } | 12 | } |
13 | void MetaFactory::addIOLayerFactory( const QString& str, | 13 | void MetaFactory::addIOLayerFactory( const QString& str, |
14 | iolayer lay) { | 14 | iolayer lay) { |
15 | m_layerFact.insert( str, lay ); | 15 | m_layerFact.insert( str, lay ); |
16 | } | 16 | } |
17 | void MetaFactory::addFileTransferLayer( const QString& str, | 17 | void MetaFactory::addFileTransferLayer( const QString& str, |
18 | filelayer lay) { | 18 | filelayer lay) { |
19 | m_fileFact.insert( str, lay ); | 19 | m_fileFact.insert( str, lay ); |
20 | } | 20 | } |
21 | QStringList MetaFactory::ioLayers()const { | 21 | QStringList MetaFactory::ioLayers()const { |
22 | QStringList list; | 22 | QStringList list; |
23 | QMap<QString, iolayer>::ConstIterator it; | 23 | QMap<QString, iolayer>::ConstIterator it; |
24 | for (it = m_layerFact.begin(); it != m_layerFact.end(); ++it ) { | 24 | for (it = m_layerFact.begin(); it != m_layerFact.end(); ++it ) { |
25 | list << it.key(); | 25 | list << it.key(); |
26 | } | 26 | } |
27 | return list; | 27 | return list; |
28 | } | 28 | } |
29 | QStringList MetaFactory::configWidgets()const { | 29 | QStringList MetaFactory::configWidgets()const { |
30 | QStringList list; | 30 | QStringList list; |
31 | QMap<QString, configWidget>::ConstIterator it; | 31 | QMap<QString, configWidget>::ConstIterator it; |
32 | for ( it = m_confFact.begin(); it != m_confFact.end(); ++it ) { | 32 | for ( it = m_confFact.begin(); it != m_confFact.end(); ++it ) { |
33 | list << it.key(); | 33 | list << it.key(); |
34 | } | 34 | } |
35 | return list; | 35 | return list; |
36 | } | 36 | } |
37 | QStringList MetaFactory::fileTransferLayers()const { | 37 | QStringList MetaFactory::fileTransferLayers()const { |
38 | QStringList list; | 38 | QStringList list; |
39 | QMap<QString, filelayer>::ConstIterator it; | 39 | QMap<QString, filelayer>::ConstIterator it; |
40 | for ( it = m_fileFact.begin(); it != m_fileFact.end(); ++it ) { | 40 | for ( it = m_fileFact.begin(); it != m_fileFact.end(); ++it ) { |
41 | list << it.key(); | 41 | list << it.key(); |
42 | } | 42 | } |
43 | return list; | 43 | return list; |
44 | } | 44 | } |
45 | IOLayer* MetaFactory::newIOLayer( const QString& str,const Profile& prof ) { | ||
46 | IOLayer* lay = 0l; | ||
47 | |||
48 | QMap<QString, iolayer>::Iterator it; | ||
49 | it = m_layerFact.find( str ); | ||
50 | if ( it != m_layerFact.end() ) { | ||
51 | lay = (*(it.data()))(prof); | ||
52 | /* | ||
53 | iolayer laye = it.data(); | ||
54 | lay = (*laye )(conf);*/ | ||
55 | } | ||
56 | |||
57 | return lay; | ||
58 | } | ||