summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/metafactory.cpp
authorzecke <zecke>2002-10-09 01:22:42 (UTC)
committer zecke <zecke>2002-10-09 01:22:42 (UTC)
commita74bf68065b94efaacb73736c7127ccb74474645 (patch) (unidiff)
treed85c40d367a4922091cc1780d8e1228d38de22c8 /noncore/apps/opie-console/metafactory.cpp
parent8c353ec8b86ee8f82cc25172fb69dd5fee65e848 (diff)
downloadopie-a74bf68065b94efaacb73736c7127ccb74474645.zip
opie-a74bf68065b94efaacb73736c7127ccb74474645.tar.gz
opie-a74bf68065b94efaacb73736c7127ccb74474645.tar.bz2
PLANS:
move around some stuff to done, open to progress... Default add EmulationLayer stuff (vt102) EmulationLayer tried to use WidgetLayer but this did not work out KeyTrans make sure to load the Q*Dict first before accessing it! ibotty please check if this was correct MainWindow make generation of Sessions possible TabWidget go back to QTabWidget for now... this is much more testedt and I do not have to debug it. Besides that OTabWidget is a kewl widget and we will take it as soon as Sessions are tested enough TabWidget also implement setCurrent for sessions Vt102 make it compile... const QByteArray != const QByteArray&
Diffstat (limited to 'noncore/apps/opie-console/metafactory.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/metafactory.cpp25
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
@@ -27,12 +27,18 @@ void MetaFactory::addIOLayerFactory( const QCString& name,
27void MetaFactory::addFileTransferLayer( const QCString& name, 27void MetaFactory::addFileTransferLayer( const QCString& name,
28 const QString& str, 28 const QString& str,
29 filelayer lay) { 29 filelayer lay) {
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}
33void 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}
33QStringList MetaFactory::ioLayers()const { 39QStringList MetaFactory::ioLayers()const {
34 QStringList list; 40 QStringList list;
35 QMap<QString, iolayer>::ConstIterator it; 41 QMap<QString, iolayer>::ConstIterator it;
36 for (it = m_layerFact.begin(); it != m_layerFact.end(); ++it ) { 42 for (it = m_layerFact.begin(); it != m_layerFact.end(); ++it ) {
37 list << it.key(); 43 list << it.key();
38 } 44 }
@@ -59,12 +65,20 @@ QStringList MetaFactory::fileTransferLayers()const {
59 QMap<QString, filelayer>::ConstIterator it; 65 QMap<QString, filelayer>::ConstIterator it;
60 for ( it = m_fileFact.begin(); it != m_fileFact.end(); ++it ) { 66 for ( it = m_fileFact.begin(); it != m_fileFact.end(); ++it ) {
61 list << it.key(); 67 list << it.key();
62 } 68 }
63 return list; 69 return list;
64} 70}
71QStringList 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
66IOLayer* MetaFactory::newIOLayer( const QString& str,const Profile& prof ) { 80IOLayer* MetaFactory::newIOLayer( const QString& str,const Profile& prof ) {
67 IOLayer* lay = 0l; 81 IOLayer* lay = 0l;
68 82
69 QMap<QString, iolayer>::Iterator it; 83 QMap<QString, iolayer>::Iterator it;
70 it = m_layerFact.find( str ); 84 it = m_layerFact.find( str );
@@ -98,12 +112,23 @@ ProfileDialogWidget *MetaFactory::newTerminalPlugin( const QString& str, QWidget
98 it = m_termFact.find( str ); 112 it = m_termFact.find( str );
99 if ( it != m_termFact.end() ) { 113 if ( it != m_termFact.end() ) {
100 wid = (*(it.data() ) )(str,parent); 114 wid = (*(it.data() ) )(str,parent);
101 } 115 }
102 return wid; 116 return wid;
103} 117}
118EmulationLayer* 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}
104QCString MetaFactory::internal( const QString& str )const { 129QCString MetaFactory::internal( const QString& str )const {
105 return m_strings[str]; 130 return m_strings[str];
106} 131}
107QString MetaFactory::external( const QCString& str )const { 132QString MetaFactory::external( const QCString& str )const {
108 QMap<QString, QCString>::ConstIterator it; 133 QMap<QString, QCString>::ConstIterator it;
109 for ( it = m_strings.begin(); it != m_strings.end(); ++it ) { 134 for ( it = m_strings.begin(); it != m_strings.end(); ++it ) {