Diffstat (limited to 'noncore/apps/opie-console/metafactory.cpp') (more/less context) (ignore 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 | |||
@@ -30,6 +30,12 @@ void MetaFactory::addFileTransferLayer( const QCString& name, | |||
30 | m_strings.insert(str, name ); | 30 | m_strings.insert(str, name ); |
31 | m_fileFact.insert( str, lay ); | 31 | m_fileFact.insert( str, lay ); |
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 { |
34 | QStringList list; | 40 | QStringList list; |
35 | QMap<QString, iolayer>::ConstIterator it; | 41 | QMap<QString, iolayer>::ConstIterator it; |
@@ -62,6 +68,14 @@ QStringList MetaFactory::fileTransferLayers()const { | |||
62 | } | 68 | } |
63 | return list; | 69 | return list; |
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 | ||
66 | IOLayer* MetaFactory::newIOLayer( const QString& str,const Profile& prof ) { | 80 | IOLayer* MetaFactory::newIOLayer( const QString& str,const Profile& prof ) { |
67 | IOLayer* lay = 0l; | 81 | IOLayer* lay = 0l; |
@@ -101,6 +115,17 @@ ProfileDialogWidget *MetaFactory::newTerminalPlugin( const QString& str, QWidget | |||
101 | } | 115 | } |
102 | return wid; | 116 | return wid; |
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 { |
105 | return m_strings[str]; | 130 | return m_strings[str]; |
106 | } | 131 | } |