author | josef <josef> | 2002-10-06 12:12:44 (UTC) |
---|---|---|
committer | josef <josef> | 2002-10-06 12:12:44 (UTC) |
commit | 13ed195192154a82fd07dde602f27d478007a27f (patch) (unidiff) | |
tree | 549b29c75a262e4e629d8e522235018ae565519b /noncore/apps/opie-console/metafactory.cpp | |
parent | 0b7136e077b0ec2767722c38ee0939b53a95fe6a (diff) | |
download | opie-13ed195192154a82fd07dde602f27d478007a27f.zip opie-13ed195192154a82fd07dde602f27d478007a27f.tar.gz opie-13ed195192154a82fd07dde602f27d478007a27f.tar.bz2 |
- more factorization
Diffstat (limited to 'noncore/apps/opie-console/metafactory.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/metafactory.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/metafactory.cpp b/noncore/apps/opie-console/metafactory.cpp index 04f1cbe..ea7f739 100644 --- a/noncore/apps/opie-console/metafactory.cpp +++ b/noncore/apps/opie-console/metafactory.cpp | |||
@@ -41,12 +41,13 @@ QStringList MetaFactory::fileTransferLayers()const { | |||
41 | QMap<QString, filelayer>::ConstIterator it; | 41 | QMap<QString, filelayer>::ConstIterator it; |
42 | for ( it = m_fileFact.begin(); it != m_fileFact.end(); ++it ) { | 42 | for ( it = m_fileFact.begin(); it != m_fileFact.end(); ++it ) { |
43 | list << it.key(); | 43 | list << it.key(); |
44 | } | 44 | } |
45 | return list; | 45 | return list; |
46 | } | 46 | } |
47 | |||
47 | IOLayer* MetaFactory::newIOLayer( const QString& str,const Profile& prof ) { | 48 | IOLayer* MetaFactory::newIOLayer( const QString& str,const Profile& prof ) { |
48 | IOLayer* lay = 0l; | 49 | IOLayer* lay = 0l; |
49 | 50 | ||
50 | QMap<QString, iolayer>::Iterator it; | 51 | QMap<QString, iolayer>::Iterator it; |
51 | it = m_layerFact.find( str ); | 52 | it = m_layerFact.find( str ); |
52 | if ( it != m_layerFact.end() ) { | 53 | if ( it != m_layerFact.end() ) { |
@@ -56,10 +57,20 @@ IOLayer* MetaFactory::newIOLayer( const QString& str,const Profile& prof ) { | |||
56 | lay = (*laye )(conf);*/ | 57 | lay = (*laye )(conf);*/ |
57 | } | 58 | } |
58 | 59 | ||
59 | return lay; | 60 | return lay; |
60 | } | 61 | } |
61 | 62 | ||
63 | QWidget *MetaFactory::newConfigWidget ( const QString& str, QWidget* parent) { | ||
64 | QWidget *w = NULL; | ||
65 | configWidget c; | ||
66 | |||
67 | c = m_confFact[str]; | ||
68 | if(c) w = c(parent); | ||
69 | |||
70 | return w; | ||
71 | } | ||
72 | |||
62 | QString MetaFactory::name( const QString& str ) { | 73 | QString MetaFactory::name( const QString& str ) { |
63 | return m_namemap[str]; | 74 | return m_namemap[str]; |
64 | } | 75 | } |
65 | 76 | ||