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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#ifndef OPIE_FILE_LISTER_H
#define OPIE_FILE_LISTER_H
#include <qfileinfo.h>
#include <qmap.h>
#include <qstring.h>
#include <qstringlist.h>
class OPixmapProvider;
class OFileSelector;
/**
* lister is something like KIO but very
* very basic and currently only for
* populating our views.
* This is a base class which needs to be implemented.
* @see OLocalLister for a filesystem based implementation
*/
class OLister {
public:
OLister( OFileSelector* );
virtual ~OLister();
virtual void reparse(const QString& path) = 0;
/**
* return a list of available mimetypes
*/
virtual QMap<QString, QStringList> mimeTypes( const QString& dir ) = 0;
void setPixmapProvider( OPixmapProvider* );
protected:
bool showFiles()const;
bool showDirs()const;
bool compliesMime( const QString& mime );
void addFile( const QString& mine,
QFileInfo*,
bool isSymlink = FALSE );
void addFile( const QString& mine,
const QString& path,
const QString& file,
bool isSymlink = FALSE );
void addDir( const QString& mine,
QFileInfo*,
bool isSymlink = FALSE );
void addDir( const QString& mine,
const QString& path,
const QString& dir,
bool isSymlink = FALSE );
void addSymlink( const QString& mine,
QFileInfo* info,
bool isSymlink = FALSE);
void addSymlink( const QString& mine,
const QString& path,
const QString& name,
bool isSymlink = FALSE );
OFileSelector* view();
OPixmapProvider* provider();
private:
OFileSelector* m_view;
OPixmapProvider* m_prov;
};
#endif
|