summaryrefslogtreecommitdiff
path: root/libopie/ofileselector/ofilefactory.h
blob: 96fb00db4e2531b492be001b0ce6b5f5bfc24c5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef OFILE_FACTORY_H
#define OFILE_FACTORY_H

#include "olister.h"
#include "ofileview.h"
class OFileFactory {
public:
    typedef OLister* (*listerFact)(OFileSelector*);
    typedef OFileView* (*viewFact)(OFileSelector*, QWidget*);
    OFileFactory();
    ~OFileFactory();

    QStringList lister()const;
    QStringList views()const;

    OFileView* view( const QString& name, OFileSelector*, QWidget* );
    OLister* lister( const QString& name, OFileSelector* );

    void addLister( const QString&,  listerFact fact );
    void addView( const QString&, viewFact );

    void removeLister( const QString& );
    void removeView( const QString& );

private:
    QMap<QString, listerFact> m_lister;
    QMap<QString, viewFact> m_view;

};


#endif