Diffstat (limited to 'libopie/ofileselector/ofilefactory.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/ofileselector/ofilefactory.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libopie/ofileselector/ofilefactory.h b/libopie/ofileselector/ofilefactory.h new file mode 100644 index 0000000..96fb00d --- a/dev/null +++ b/libopie/ofileselector/ofilefactory.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef OFILE_FACTORY_H | ||
2 | #define OFILE_FACTORY_H | ||
3 | |||
4 | #include "olister.h" | ||
5 | #include "ofileview.h" | ||
6 | class OFileFactory { | ||
7 | public: | ||
8 | typedef OLister* (*listerFact)(OFileSelector*); | ||
9 | typedef OFileView* (*viewFact)(OFileSelector*, QWidget*); | ||
10 | OFileFactory(); | ||
11 | ~OFileFactory(); | ||
12 | |||
13 | QStringList lister()const; | ||
14 | QStringList views()const; | ||
15 | |||
16 | OFileView* view( const QString& name, OFileSelector*, QWidget* ); | ||
17 | OLister* lister( const QString& name, OFileSelector* ); | ||
18 | |||
19 | void addLister( const QString&, listerFact fact ); | ||
20 | void addView( const QString&, viewFact ); | ||
21 | |||
22 | void removeLister( const QString& ); | ||
23 | void removeView( const QString& ); | ||
24 | |||
25 | private: | ||
26 | QMap<QString, listerFact> m_lister; | ||
27 | QMap<QString, viewFact> m_view; | ||
28 | |||
29 | }; | ||
30 | |||
31 | |||
32 | #endif | ||