summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/metafactory.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/metafactory.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/metafactory.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/metafactory.h b/noncore/apps/opie-console/metafactory.h
index 7f0699b..d6aa5e2 100644
--- a/noncore/apps/opie-console/metafactory.h
+++ b/noncore/apps/opie-console/metafactory.h
@@ -4,34 +4,36 @@
4/** 4/**
5 * The MetaFactory is used to keep track of all IOLayers, FileTransferLayers and ConfigWidgets 5 * The MetaFactory is used to keep track of all IOLayers, FileTransferLayers and ConfigWidgets
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 "receive_layer.h"
16#include "profile.h" 17#include "profile.h"
17#include "profiledialogwidget.h" 18#include "profiledialogwidget.h"
18#include "emulation_layer.h" 19#include "emulation_layer.h"
19 20
20class WidgetLayer; 21class WidgetLayer;
21class MetaFactory { 22class MetaFactory {
22public: 23public:
23 typedef ProfileDialogWidget* (*configWidget)(const QString&, QWidget* parent); 24 typedef ProfileDialogWidget* (*configWidget)(const QString&, QWidget* parent);
24 typedef IOLayer* (*iolayer)(const Profile& ); 25 typedef IOLayer* (*iolayer)(const Profile& );
25 typedef FileTransferLayer* (*filelayer)(IOLayer*); 26 typedef FileTransferLayer* (*filelayer)(IOLayer*);
27 typedef ReceiveLayer* (*receivelayer)(IOLayer*);
26 typedef EmulationLayer* (*emulationLayer)(WidgetLayer* ); 28 typedef EmulationLayer* (*emulationLayer)(WidgetLayer* );
27 29
28 MetaFactory(); 30 MetaFactory();
29 ~MetaFactory(); 31 ~MetaFactory();
30 32
31 /** 33 /**
32 * add a ProfileDialogWidget to the factory 34 * add a ProfileDialogWidget to the factory
33 * name is the name shown to the user 35 * name is the name shown to the user
34 */ 36 */
35 void addConnectionWidgetFactory( const QCString& internalName, 37 void addConnectionWidgetFactory( const QCString& internalName,
36 const QString& uiString, 38 const QString& uiString,
37 configWidget ); 39 configWidget );
@@ -43,65 +45,71 @@ public:
43 * adds an IOLayer factory 45 * adds an IOLayer factory
44 */ 46 */
45 void addIOLayerFactory( const QCString&, 47 void addIOLayerFactory( const QCString&,
46 const QString&, 48 const QString&,
47 iolayer ); 49 iolayer );
48 50
49 /** 51 /**
50 * adds a FileTransfer Layer 52 * adds a FileTransfer Layer
51 */ 53 */
52 void addFileTransferLayer( const QCString& name, 54 void addFileTransferLayer( const QCString& name,
53 const QString&, 55 const QString&,
54 filelayer ); 56 filelayer );
57 void addReceiveLayer( const QCString& name,
58 const QString&,
59 receivelayer);
55 60
56 /** 61 /**
57 * adds a Factory for Emulation to the Layer.. 62 * adds a Factory for Emulation to the Layer..
58 */ 63 */
59 void addEmulationLayer ( const QCString& name, 64 void addEmulationLayer ( const QCString& name,
60 const QString& uiString, 65 const QString& uiString,
61 emulationLayer ); 66 emulationLayer );
62 67
63 /* translated UI Strings */ 68 /* translated UI Strings */
64 QStringList ioLayers()const; 69 QStringList ioLayers()const;
65 QStringList connectionWidgets()const; 70 QStringList connectionWidgets()const;
66 71
67 /** 72 /**
68 * Terminal Configuration widgets 73 * Terminal Configuration widgets
69 */ 74 */
70 QStringList terminalWidgets()const; 75 QStringList terminalWidgets()const;
71 QStringList fileTransferLayers()const; 76 QStringList fileTransferLayers()const;
77 QStringList receiveLayers()const;
72 QStringList emulationLayers()const; 78 QStringList emulationLayers()const;
73 79
74 /** 80 /**
75 * the generation... 81 * the generation...
76 */ 82 */
77 IOLayer* newIOLayer( const QString&,const Profile& ); 83 IOLayer* newIOLayer( const QString&,const Profile& );
78 ProfileDialogWidget *newConnectionPlugin ( const QString&, QWidget* ); 84 ProfileDialogWidget *newConnectionPlugin ( const QString&, QWidget* );
79 ProfileDialogWidget* newTerminalPlugin( const QString&, QWidget* ); 85 ProfileDialogWidget* newTerminalPlugin( const QString&, QWidget* );
80 EmulationLayer* newEmulationLayer(const QString&, WidgetLayer* ); 86 EmulationLayer* newEmulationLayer(const QString&, WidgetLayer* );
81 FileTransferLayer* newFileTransfer(const QString&, IOLayer* ); 87 FileTransferLayer* newFileTransfer(const QString&, IOLayer* );
88 ReceiveLayer* newReceive(const QString&, IOLayer* );
82 89
83 /* 90 /*
84 * internal takes the maybe translated 91 * internal takes the maybe translated
85 * public QString and maps it to the internal 92 * public QString and maps it to the internal
86 * not translatable QCString 93 * not translatable QCString
87 */ 94 */
88 QCString internal( const QString& )const; 95 QCString internal( const QString& )const;
89 96
90 /* 97 /*
91 * external takes the internal name 98 * external takes the internal name
92 * it returns a translated name 99 * it returns a translated name
93 */ 100 */
94 QString external( const QCString& )const; 101 QString external( const QCString& )const;
95 102
96 103
97private: 104private:
98 QMap<QString, QCString> m_strings; 105 QMap<QString, QCString> m_strings;
99 QMap<QString, configWidget> m_conFact; 106 QMap<QString, configWidget> m_conFact;
100 QMap<QString, configWidget> m_termFact; 107 QMap<QString, configWidget> m_termFact;
101 QMap<QString, iolayer> m_layerFact; 108 QMap<QString, iolayer> m_layerFact;
102 QMap<QString, filelayer> m_fileFact; 109 QMap<QString, filelayer> m_fileFact;
110 QMap<QString, receivelayer> m_receiveFact;
103 QMap<QString, emulationLayer> m_emu; 111 QMap<QString, emulationLayer> m_emu;
104}; 112};
105 113
106 114
107#endif 115#endif