Diffstat (limited to 'noncore/apps/opie-console/metafactory.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/metafactory.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/metafactory.h b/noncore/apps/opie-console/metafactory.h index 2245231..8c714b3 100644 --- a/noncore/apps/opie-console/metafactory.h +++ b/noncore/apps/opie-console/metafactory.h | |||
@@ -1,50 +1,51 @@ | |||
1 | #ifndef OPIE_META_FACTORY_H | 1 | #ifndef OPIE_META_FACTORY_H |
2 | #define OPIE_META_FACTORY_H | 2 | #define OPIE_META_FACTORY_H |
3 | 3 | ||
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 "profile.h" | 16 | #include "profile.h" |
17 | #include "profileeditorplugins.h" | ||
17 | 18 | ||
18 | class MetaFactory { | 19 | class MetaFactory { |
19 | public: | 20 | public: |
20 | typedef QWidget* (*configWidget)(QWidget* parent); | 21 | typedef ProfileEditorPlugin* (*configWidget)(QWidget* parent, const Profile&); |
21 | typedef IOLayer* (*iolayer)(const Profile& ); | 22 | typedef IOLayer* (*iolayer)(const Profile& ); |
22 | typedef FileTransferLayer* (*filelayer)(IOLayer*); | 23 | typedef FileTransferLayer* (*filelayer)(IOLayer*); |
23 | 24 | ||
24 | MetaFactory(); | 25 | MetaFactory(); |
25 | ~MetaFactory(); | 26 | ~MetaFactory(); |
26 | 27 | ||
27 | void addConfigWidgetFactory( const QString&, | 28 | void addConfigWidgetFactory( const QString&, |
28 | const QString&, | 29 | const QString&, |
29 | configWidget ); | 30 | configWidget ); |
30 | void addIOLayerFactory(const QString&, | 31 | void addIOLayerFactory(const QString&, |
31 | iolayer ); | 32 | iolayer ); |
32 | void addFileTransferLayer( const QString&, | 33 | void addFileTransferLayer( const QString&, |
33 | filelayer ); | 34 | filelayer ); |
34 | QStringList ioLayers()const; | 35 | QStringList ioLayers()const; |
35 | QStringList configWidgets()const; | 36 | QStringList configWidgets()const; |
36 | QStringList fileTransferLayers()const; | 37 | QStringList fileTransferLayers()const; |
37 | IOLayer* newIOLayer( const QString&,const Profile& ); | 38 | IOLayer* newIOLayer( const QString&,const Profile& ); |
38 | QWidget *newConfigWidget ( const QString&, QWidget* ); | 39 | ProfileEditorPlugin *newConfigPlugin ( const QString&, QWidget*, const Profile& ); |
39 | 40 | ||
40 | QString name( const QString& ); | 41 | QString name( const QString& ); |
41 | 42 | ||
42 | private: | 43 | private: |
43 | QMap<QString, configWidget> m_confFact; | 44 | QMap<QString, configWidget> m_confFact; |
44 | QMap<QString, iolayer> m_layerFact; | 45 | QMap<QString, iolayer> m_layerFact; |
45 | QMap<QString, filelayer> m_fileFact; | 46 | QMap<QString, filelayer> m_fileFact; |
46 | QMap<QString, QString> m_namemap; | 47 | QMap<QString, QString> m_namemap; |
47 | }; | 48 | }; |
48 | 49 | ||
49 | 50 | ||
50 | #endif | 51 | #endif |