summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/metafactory.h
authorzecke <zecke>2002-10-08 16:37:37 (UTC)
committer zecke <zecke>2002-10-08 16:37:37 (UTC)
commit76fb8a57bf9fbae3a7073c8b0be1216f34adf99c (patch) (unidiff)
tree3f486d66ce474039b1a0fc4ade770e6e8a7c32b3 /noncore/apps/opie-console/metafactory.h
parentfaeb94a4000dc539577af465107b5d10903f92d6 (diff)
downloadopie-76fb8a57bf9fbae3a7073c8b0be1216f34adf99c.zip
opie-76fb8a57bf9fbae3a7073c8b0be1216f34adf99c.tar.gz
opie-76fb8a57bf9fbae3a7073c8b0be1216f34adf99c.tar.bz2
SzModem:
Make it compile remove = 0 from sendFile Add a Type to Sz so it could cover SX,SY too MetaFactory: take QCString name QString uiString so Carsten will be able to translate and users can switch Language without losing profiles Default It's aware of all Default/BuiltIn Plugins and adds them to the factory Common typedef bool BOOL TT is not using bool because it wasn't available at that time they use uint : 1... maybe we should change UINT_8 to Q_UINT8... MainWindow: give the factory to the config widget use Default IOLayer reload should take Profile not Config ConfigDialog: make use of Factory and do not do new MetaFactory.. i should make the c'tor private and add MainWindow as friend ProfileEditorDialog: Huge clean ups to the architecture. I still need to convert the widgets. Use the factory right
Diffstat (limited to 'noncore/apps/opie-console/metafactory.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/metafactory.h60
1 files changed, 47 insertions, 13 deletions
diff --git a/noncore/apps/opie-console/metafactory.h b/noncore/apps/opie-console/metafactory.h
index 216de03..3f7ddce 100644
--- a/noncore/apps/opie-console/metafactory.h
+++ b/noncore/apps/opie-console/metafactory.h
@@ -14,37 +14,71 @@
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 "profileeditorplugins.h" 17#include "profiledialogwidget.h"
18 18
19class MetaFactory { 19class MetaFactory {
20public: 20public:
21 typedef ProfileEditorPlugin* (*configWidget)(QWidget* parent, Profile* prof); 21 typedef ProfileDialogWidget* (*configWidget)(const QString&, QWidget* parent);
22 typedef IOLayer* (*iolayer)(const Profile& ); 22 typedef IOLayer* (*iolayer)(const Profile& );
23 typedef FileTransferLayer* (*filelayer)(IOLayer*); 23 typedef FileTransferLayer* (*filelayer)(IOLayer*);
24 24
25 MetaFactory(); 25 MetaFactory();
26 ~MetaFactory(); 26 ~MetaFactory();
27 27
28 void addConfigWidgetFactory( const QString&, 28 /**
29 const QString&, 29 * add a ProfileDialogWidget to the factory
30 configWidget ); 30 * name is the name shown to the user
31 void addIOLayerFactory(const QString&, 31 */
32 iolayer ); 32 void addConnectionWidgetFactory( const QCString& internalName,
33 void addFileTransferLayer( const QString&, 33 const QString& uiString,
34 configWidget );
35 void addTerminalWidgetFactory ( const QCString& internalName,
36 const QString& name,
37 configWidget );
38
39 /**
40 * adds an IOLayer factory
41 */
42 void addIOLayerFactory( const QCString&,
43 const QString&,
44 iolayer );
45
46 /**
47 * adds a FileTransfer Layer
48 */
49 void addFileTransferLayer( const QCString& name,
50 const QString&,
34 filelayer ); 51 filelayer );
52
53 /* translated UI Strings */
35 QStringList ioLayers()const; 54 QStringList ioLayers()const;
36 QStringList configWidgets()const; 55 QStringList connectionWidgets()const;
56 QStringList terminalWidgets()const;
37 QStringList fileTransferLayers()const; 57 QStringList fileTransferLayers()const;
38 IOLayer* newIOLayer( const QString&,const Profile& ); 58 IOLayer* newIOLayer( const QString&,const Profile& );
39 ProfileEditorPlugin *newConfigPlugin ( const QString&, QWidget*, Profile* ); 59 ProfileDialogWidget *newConnectionPlugin ( const QString&, QWidget* );
60 ProfileDialogWidget* newTerminalPlugin( const QString&, QWidget* );
61
62 /*
63 * internal takes the maybe translated
64 * public QString and maps it to the internal
65 * not translatable QCString
66 */
67 QCString internal( const QString& )const;
68
69 /*
70 * external takes the internal name
71 * it returns a translated name
72 */
73 QString external( const QCString& )const;
40 74
41 QString name( const QString& );
42 75
43private: 76private:
44 QMap<QString, configWidget> m_confFact; 77 QMap<QString, QCString> m_strings;
78 QMap<QString, configWidget> m_conFact;
79 QMap<QString, configWidget> m_termFact;
45 QMap<QString, iolayer> m_layerFact; 80 QMap<QString, iolayer> m_layerFact;
46 QMap<QString, filelayer> m_fileFact; 81 QMap<QString, filelayer> m_fileFact;
47 QMap<QString, QString> m_namemap;
48}; 82};
49 83
50 84