summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/metafactory.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/metafactory.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/metafactory.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/metafactory.h b/noncore/apps/opie-console/metafactory.h
index 3f7ddce..71c35a2 100644
--- a/noncore/apps/opie-console/metafactory.h
+++ b/noncore/apps/opie-console/metafactory.h
@@ -6,30 +6,33 @@
6 * and to instantiate these implementations on demand 6 * and to instantiate these implementations on demand
7 */ 7 */
8 8
9#include <qwidget.h> 9#include <qwidget.h>
10#include <qmap.h> 10#include <qmap.h>
11 11
12#include <qpe/config.h> 12#include <qpe/config.h>
13 13
14#include "io_layer.h" 14#include "io_layer.h"
15#include "file_layer.h" 15#include "file_layer.h"
16#include "profile.h" 16#include "profile.h"
17#include "profiledialogwidget.h" 17#include "profiledialogwidget.h"
18#include "emulation_layer.h"
18 19
20class Widget;
19class MetaFactory { 21class MetaFactory {
20public: 22public:
21 typedef ProfileDialogWidget* (*configWidget)(const QString&, QWidget* parent); 23 typedef ProfileDialogWidget* (*configWidget)(const QString&, QWidget* parent);
22 typedef IOLayer* (*iolayer)(const Profile& ); 24 typedef IOLayer* (*iolayer)(const Profile& );
23 typedef FileTransferLayer* (*filelayer)(IOLayer*); 25 typedef FileTransferLayer* (*filelayer)(IOLayer*);
26 typedef EmulationLayer* (*emulationLayer)(Widget* );
24 27
25 MetaFactory(); 28 MetaFactory();
26 ~MetaFactory(); 29 ~MetaFactory();
27 30
28 /** 31 /**
29 * add a ProfileDialogWidget to the factory 32 * add a ProfileDialogWidget to the factory
30 * name is the name shown to the user 33 * name is the name shown to the user
31 */ 34 */
32 void addConnectionWidgetFactory( const QCString& internalName, 35 void addConnectionWidgetFactory( const QCString& internalName,
33 const QString& uiString, 36 const QString& uiString,
34 configWidget ); 37 configWidget );
35 void addTerminalWidgetFactory ( const QCString& internalName, 38 void addTerminalWidgetFactory ( const QCString& internalName,
@@ -41,45 +44,63 @@ public:
41 */ 44 */
42 void addIOLayerFactory( const QCString&, 45 void addIOLayerFactory( const QCString&,
43 const QString&, 46 const QString&,
44 iolayer ); 47 iolayer );
45 48
46 /** 49 /**
47 * adds a FileTransfer Layer 50 * adds a FileTransfer Layer
48 */ 51 */
49 void addFileTransferLayer( const QCString& name, 52 void addFileTransferLayer( const QCString& name,
50 const QString&, 53 const QString&,
51 filelayer ); 54 filelayer );
52 55
56 /**
57 * adds a Factory for Emulation to the Layer..
58 */
59 void addEmulationLayer ( const QCString& name,
60 const QString& uiString,
61 emulationLayer );
62
53 /* translated UI Strings */ 63 /* translated UI Strings */
54 QStringList ioLayers()const; 64 QStringList ioLayers()const;
55 QStringList connectionWidgets()const; 65 QStringList connectionWidgets()const;
66
67 /**
68 * Terminal Configuration widgets
69 */
56 QStringList terminalWidgets()const; 70 QStringList terminalWidgets()const;
57 QStringList fileTransferLayers()const; 71 QStringList fileTransferLayers()const;
72 QStringList emulationLayers()const;
73
74 /**
75 * the generation...
76 */
58 IOLayer* newIOLayer( const QString&,const Profile& ); 77 IOLayer* newIOLayer( const QString&,const Profile& );
59 ProfileDialogWidget *newConnectionPlugin ( const QString&, QWidget* ); 78 ProfileDialogWidget *newConnectionPlugin ( const QString&, QWidget* );
60 ProfileDialogWidget* newTerminalPlugin( const QString&, QWidget* ); 79 ProfileDialogWidget* newTerminalPlugin( const QString&, QWidget* );
80 EmulationLayer* newEmulationLayer(const QString&, Widget* );
61 81
62 /* 82 /*
63 * internal takes the maybe translated 83 * internal takes the maybe translated
64 * public QString and maps it to the internal 84 * public QString and maps it to the internal
65 * not translatable QCString 85 * not translatable QCString
66 */ 86 */
67 QCString internal( const QString& )const; 87 QCString internal( const QString& )const;
68 88
69 /* 89 /*
70 * external takes the internal name 90 * external takes the internal name
71 * it returns a translated name 91 * it returns a translated name
72 */ 92 */
73 QString external( const QCString& )const; 93 QString external( const QCString& )const;
74 94
75 95
76private: 96private:
77 QMap<QString, QCString> m_strings; 97 QMap<QString, QCString> m_strings;
78 QMap<QString, configWidget> m_conFact; 98 QMap<QString, configWidget> m_conFact;
79 QMap<QString, configWidget> m_termFact; 99 QMap<QString, configWidget> m_termFact;
80 QMap<QString, iolayer> m_layerFact; 100 QMap<QString, iolayer> m_layerFact;
81 QMap<QString, filelayer> m_fileFact; 101 QMap<QString, filelayer> m_fileFact;
102 QMap<QString, emulationLayer> m_emu;
82}; 103};
83 104
84 105
85#endif 106#endif