Diffstat (limited to 'noncore/apps/opie-console/metafactory.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/metafactory.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/metafactory.cpp b/noncore/apps/opie-console/metafactory.cpp index 4501ec2..02a9f9b 100644 --- a/noncore/apps/opie-console/metafactory.cpp +++ b/noncore/apps/opie-console/metafactory.cpp | |||
@@ -32,2 +32,8 @@ void MetaFactory::addFileTransferLayer( const QCString& name, | |||
32 | } | 32 | } |
33 | void MetaFactory::addEmulationLayer( const QCString& name, | ||
34 | const QString& str, | ||
35 | emulationLayer em) { | ||
36 | m_strings.insert(str, name ); | ||
37 | m_emu.insert( str, em ); | ||
38 | } | ||
33 | QStringList MetaFactory::ioLayers()const { | 39 | QStringList MetaFactory::ioLayers()const { |
@@ -64,2 +70,10 @@ QStringList MetaFactory::fileTransferLayers()const { | |||
64 | } | 70 | } |
71 | QStringList MetaFactory::emulationLayers()const { | ||
72 | QStringList list; | ||
73 | QMap<QString, emulationLayer>::ConstIterator it; | ||
74 | for ( it = m_emu.begin(); it != m_emu.end(); ++it ) { | ||
75 | list << it.key(); | ||
76 | } | ||
77 | return list; | ||
78 | } | ||
65 | 79 | ||
@@ -103,2 +117,13 @@ ProfileDialogWidget *MetaFactory::newTerminalPlugin( const QString& str, QWidget | |||
103 | } | 117 | } |
118 | EmulationLayer* MetaFactory::newEmulationLayer( const QString& str, Widget* wid) { | ||
119 | EmulationLayer* lay = 0l; | ||
120 | |||
121 | QMap<QString, emulationLayer>::Iterator it; | ||
122 | it = m_emu.find( str ); | ||
123 | if ( it != m_emu.end() ) { | ||
124 | lay = (*(it.data() ) )(wid); | ||
125 | } | ||
126 | |||
127 | return lay; | ||
128 | } | ||
104 | QCString MetaFactory::internal( const QString& str )const { | 129 | QCString MetaFactory::internal( const QString& str )const { |