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, 0 insertions, 25 deletions
diff --git a/noncore/apps/opie-console/metafactory.cpp b/noncore/apps/opie-console/metafactory.cpp index 0b43e17..24928e7 100644 --- a/noncore/apps/opie-console/metafactory.cpp +++ b/noncore/apps/opie-console/metafactory.cpp | |||
@@ -22,102 +22,88 @@ void MetaFactory::addKeyboardWidgetFactory( const QCString& name, | |||
22 | const QString & str, | 22 | const QString & str, |
23 | configWidget wid) { | 23 | configWidget wid) { |
24 | m_strings.insert( str, name ); | 24 | m_strings.insert( str, name ); |
25 | m_keyFact.insert( str, wid ); | 25 | m_keyFact.insert( str, wid ); |
26 | 26 | ||
27 | } | 27 | } |
28 | void MetaFactory::addIOLayerFactory( const QCString& name, | 28 | void MetaFactory::addIOLayerFactory( const QCString& name, |
29 | const QString& str, | 29 | const QString& str, |
30 | iolayer lay) { | 30 | iolayer lay) { |
31 | m_strings.insert( str, name ); | 31 | m_strings.insert( str, name ); |
32 | m_layerFact.insert( str, lay ); | 32 | m_layerFact.insert( str, lay ); |
33 | } | 33 | } |
34 | void MetaFactory::addFileTransferLayer( const QCString& name, | 34 | void MetaFactory::addFileTransferLayer( const QCString& name, |
35 | const QString& str, | 35 | const QString& str, |
36 | filelayer lay) { | 36 | filelayer lay) { |
37 | m_strings.insert(str, name ); | 37 | m_strings.insert(str, name ); |
38 | m_fileFact.insert( str, lay ); | 38 | m_fileFact.insert( str, lay ); |
39 | } | 39 | } |
40 | void MetaFactory::addReceiveLayer( const QCString& name, | 40 | void MetaFactory::addReceiveLayer( const QCString& name, |
41 | const QString& str, | 41 | const QString& str, |
42 | receivelayer lay) { | 42 | receivelayer lay) { |
43 | m_strings.insert(str, name ); | 43 | m_strings.insert(str, name ); |
44 | m_receiveFact.insert( str, lay ); | 44 | m_receiveFact.insert( str, lay ); |
45 | } | 45 | } |
46 | void MetaFactory::addEmulationLayer( const QCString& name, | ||
47 | const QString& str, | ||
48 | emulationLayer em) { | ||
49 | m_strings.insert(str, name ); | ||
50 | m_emu.insert( str, em ); | ||
51 | } | ||
52 | QStringList MetaFactory::ioLayers()const { | 46 | QStringList MetaFactory::ioLayers()const { |
53 | QStringList list; | 47 | QStringList list; |
54 | QMap<QString, iolayer>::ConstIterator it; | 48 | QMap<QString, iolayer>::ConstIterator it; |
55 | for (it = m_layerFact.begin(); it != m_layerFact.end(); ++it ) { | 49 | for (it = m_layerFact.begin(); it != m_layerFact.end(); ++it ) { |
56 | list << it.key(); | 50 | list << it.key(); |
57 | } | 51 | } |
58 | return list; | 52 | return list; |
59 | } | 53 | } |
60 | QStringList MetaFactory::connectionWidgets()const { | 54 | QStringList MetaFactory::connectionWidgets()const { |
61 | QStringList list; | 55 | QStringList list; |
62 | QMap<QString, configWidget>::ConstIterator it; | 56 | QMap<QString, configWidget>::ConstIterator it; |
63 | for ( it = m_conFact.begin(); it != m_conFact.end(); ++it ) { | 57 | for ( it = m_conFact.begin(); it != m_conFact.end(); ++it ) { |
64 | list << it.key(); | 58 | list << it.key(); |
65 | } | 59 | } |
66 | return list; | 60 | return list; |
67 | } | 61 | } |
68 | QStringList MetaFactory::terminalWidgets()const { | 62 | QStringList MetaFactory::terminalWidgets()const { |
69 | QStringList list; | 63 | QStringList list; |
70 | QMap<QString, configWidget>::ConstIterator it; | 64 | QMap<QString, configWidget>::ConstIterator it; |
71 | for ( it = m_termFact.begin(); it != m_termFact.end(); ++it ) { | 65 | for ( it = m_termFact.begin(); it != m_termFact.end(); ++it ) { |
72 | list << it.key(); | 66 | list << it.key(); |
73 | } | 67 | } |
74 | return list; | 68 | return list; |
75 | } | 69 | } |
76 | QStringList MetaFactory::fileTransferLayers()const { | 70 | QStringList MetaFactory::fileTransferLayers()const { |
77 | QStringList list; | 71 | QStringList list; |
78 | QMap<QString, filelayer>::ConstIterator it; | 72 | QMap<QString, filelayer>::ConstIterator it; |
79 | for ( it = m_fileFact.begin(); it != m_fileFact.end(); ++it ) { | 73 | for ( it = m_fileFact.begin(); it != m_fileFact.end(); ++it ) { |
80 | list << it.key(); | 74 | list << it.key(); |
81 | } | 75 | } |
82 | return list; | 76 | return list; |
83 | } | 77 | } |
84 | QStringList MetaFactory::receiveLayers()const { | 78 | QStringList MetaFactory::receiveLayers()const { |
85 | QStringList list; | 79 | QStringList list; |
86 | QMap<QString, receivelayer>::ConstIterator it; | 80 | QMap<QString, receivelayer>::ConstIterator it; |
87 | for ( it = m_receiveFact.begin(); it != m_receiveFact.end(); ++it ) { | 81 | for ( it = m_receiveFact.begin(); it != m_receiveFact.end(); ++it ) { |
88 | list << it.key(); | 82 | list << it.key(); |
89 | } | 83 | } |
90 | return list; | 84 | return list; |
91 | } | 85 | } |
92 | QStringList MetaFactory::emulationLayers()const { | ||
93 | QStringList list; | ||
94 | QMap<QString, emulationLayer>::ConstIterator it; | ||
95 | for ( it = m_emu.begin(); it != m_emu.end(); ++it ) { | ||
96 | list << it.key(); | ||
97 | } | ||
98 | return list; | ||
99 | } | ||
100 | 86 | ||
101 | IOLayer* MetaFactory::newIOLayer( const QString& str,const Profile& prof ) { | 87 | IOLayer* MetaFactory::newIOLayer( const QString& str,const Profile& prof ) { |
102 | IOLayer* lay = 0l; | 88 | IOLayer* lay = 0l; |
103 | 89 | ||
104 | QMap<QString, iolayer>::Iterator it; | 90 | QMap<QString, iolayer>::Iterator it; |
105 | it = m_layerFact.find( str ); | 91 | it = m_layerFact.find( str ); |
106 | if ( it != m_layerFact.end() ) { | 92 | if ( it != m_layerFact.end() ) { |
107 | lay = (*(it.data()))(prof); | 93 | lay = (*(it.data()))(prof); |
108 | /* | 94 | /* |
109 | iolayer laye = it.data(); | 95 | iolayer laye = it.data(); |
110 | lay = (*laye )(conf);*/ | 96 | lay = (*laye )(conf);*/ |
111 | } | 97 | } |
112 | 98 | ||
113 | return lay; | 99 | return lay; |
114 | } | 100 | } |
115 | 101 | ||
116 | ProfileDialogWidget *MetaFactory::newConnectionPlugin ( const QString& str, QWidget *parent) { | 102 | ProfileDialogWidget *MetaFactory::newConnectionPlugin ( const QString& str, QWidget *parent) { |
117 | ProfileDialogWidget* wid = 0l; | 103 | ProfileDialogWidget* wid = 0l; |
118 | 104 | ||
119 | QMap<QString, configWidget>::Iterator it; | 105 | QMap<QString, configWidget>::Iterator it; |
120 | it = m_conFact.find( str ); | 106 | it = m_conFact.find( str ); |
121 | if ( it != m_conFact.end() ) { | 107 | if ( it != m_conFact.end() ) { |
122 | wid = (*(it.data() ) )(str,parent); | 108 | wid = (*(it.data() ) )(str,parent); |
123 | } | 109 | } |
@@ -127,59 +113,48 @@ ProfileDialogWidget *MetaFactory::newTerminalPlugin( const QString& str, QWidget | |||
127 | if (str.isEmpty() ) | 113 | if (str.isEmpty() ) |
128 | return 0l; | 114 | return 0l; |
129 | ProfileDialogWidget* wid = 0l; | 115 | ProfileDialogWidget* wid = 0l; |
130 | 116 | ||
131 | QMap<QString, configWidget>::Iterator it; | 117 | QMap<QString, configWidget>::Iterator it; |
132 | it = m_termFact.find( str ); | 118 | it = m_termFact.find( str ); |
133 | if ( it != m_termFact.end() ) { | 119 | if ( it != m_termFact.end() ) { |
134 | wid = (*(it.data() ) )(str,parent); | 120 | wid = (*(it.data() ) )(str,parent); |
135 | } | 121 | } |
136 | return wid; | 122 | return wid; |
137 | } | 123 | } |
138 | ProfileDialogWidget *MetaFactory::newKeyboardPlugin( const QString& str, QWidget *parent) { | 124 | ProfileDialogWidget *MetaFactory::newKeyboardPlugin( const QString& str, QWidget *parent) { |
139 | 125 | ||
140 | if (str.isEmpty() ) | 126 | if (str.isEmpty() ) |
141 | return 0l; | 127 | return 0l; |
142 | ProfileDialogWidget* wid = 0l; | 128 | ProfileDialogWidget* wid = 0l; |
143 | 129 | ||
144 | QMap<QString, configWidget>::Iterator it; | 130 | QMap<QString, configWidget>::Iterator it; |
145 | it = m_keyFact.find( str ); | 131 | it = m_keyFact.find( str ); |
146 | if ( it != m_keyFact.end() ) { | 132 | if ( it != m_keyFact.end() ) { |
147 | wid = (*(it.data() ) )(str,parent); | 133 | wid = (*(it.data() ) )(str,parent); |
148 | } | 134 | } |
149 | return wid; | 135 | return wid; |
150 | } | 136 | } |
151 | EmulationLayer* MetaFactory::newEmulationLayer( const QString& str, WidgetLayer* wid) { | ||
152 | EmulationLayer* lay = 0l; | ||
153 | |||
154 | QMap<QString, emulationLayer>::Iterator it; | ||
155 | it = m_emu.find( str ); | ||
156 | if ( it != m_emu.end() ) { | ||
157 | lay = (*(it.data() ) )(wid); | ||
158 | } | ||
159 | |||
160 | return lay; | ||
161 | } | ||
162 | FileTransferLayer* MetaFactory::newFileTransfer(const QString& str, IOLayer* lay ) { | 137 | FileTransferLayer* MetaFactory::newFileTransfer(const QString& str, IOLayer* lay ) { |
163 | FileTransferLayer* file = 0l; | 138 | FileTransferLayer* file = 0l; |
164 | QMap<QString, filelayer>::Iterator it; | 139 | QMap<QString, filelayer>::Iterator it; |
165 | it = m_fileFact.find( str ); | 140 | it = m_fileFact.find( str ); |
166 | if ( it != m_fileFact.end() ) { | 141 | if ( it != m_fileFact.end() ) { |
167 | file = (*(it.data() ) )(lay); | 142 | file = (*(it.data() ) )(lay); |
168 | } | 143 | } |
169 | return file; | 144 | return file; |
170 | } | 145 | } |
171 | ReceiveLayer* MetaFactory::newReceive(const QString& str, IOLayer* lay ) { | 146 | ReceiveLayer* MetaFactory::newReceive(const QString& str, IOLayer* lay ) { |
172 | ReceiveLayer* file = 0l; | 147 | ReceiveLayer* file = 0l; |
173 | QMap<QString, receivelayer>::Iterator it; | 148 | QMap<QString, receivelayer>::Iterator it; |
174 | it = m_receiveFact.find( str ); | 149 | it = m_receiveFact.find( str ); |
175 | if ( it != m_receiveFact.end() ) { | 150 | if ( it != m_receiveFact.end() ) { |
176 | file = (*(it.data() ) )(lay); | 151 | file = (*(it.data() ) )(lay); |
177 | } | 152 | } |
178 | return file; | 153 | return file; |
179 | } | 154 | } |
180 | QCString MetaFactory::internal( const QString& str )const { | 155 | QCString MetaFactory::internal( const QString& str )const { |
181 | return m_strings[str]; | 156 | return m_strings[str]; |
182 | } | 157 | } |
183 | QString MetaFactory::external( const QCString& str )const { | 158 | QString MetaFactory::external( const QCString& str )const { |
184 | QMap<QString, QCString>::ConstIterator it; | 159 | QMap<QString, QCString>::ConstIterator it; |
185 | for ( it = m_strings.begin(); it != m_strings.end(); ++it ) { | 160 | for ( it = m_strings.begin(); it != m_strings.end(); ++it ) { |