forked from igoreksiz/VBParser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfilescanner.h
More file actions
43 lines (39 loc) · 1012 Bytes
/
Copy pathfilescanner.h
File metadata and controls
43 lines (39 loc) · 1012 Bytes
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
#ifndef FILESCANNER_H
#define FILESCANNER_H
#include "common.h"
typedef QTreeWidgetItem* (*scannerCallback_t) (QString, qint64, QString);
class FileScanner : public QObject
{
Q_OBJECT
private:
scannerCallback_t callback;
volatile bool bStop;
bool bRecursive;
QString charset;
QDir dirPath;
size_t iFilesToScan;
size_t iProgress;
qint64 options;
//
void scanPath(QDir dirPath);
size_t countFiles(QDir dirPath);
public slots:
void work();
public:
FileScanner(scannerCallback_t callback);
void setRecursive(bool bRecoursive);
void setCharset(QString charset);
void setDir(QString dirPath);
void stop();
void setOptions(qint64 options);
bool isScanning();
~FileScanner();
signals:
void scanStarted(int xmin, int xmax);
void scanChanged(int state);
void scanUpdateTextStatus(QString message);
void scanFinished();
void scanAddResult(QTreeWidgetItem* newFileRoot);
void scanPrepare();
};
#endif // FILESCANNER_H