-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCWorkerThread.h
46 lines (32 loc) · 867 Bytes
/
CWorkerThread.h
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
#ifndef CWORKERTHREAD_H
#define CWORKERTHREAD_H
#include <QCoreApplication>
#include <QObject>
#include <QException>
#include <QDirIterator>
#include <QDir>
#include <QFile>
#include <QtConcurrent/qtconcurrentrun.h>
#include <thread>
class CWorkerThread : public QObject
{
Q_OBJECT
private:
int m_iError;
std::atomic_bool m_isCancel;
public:
void SearchThread(const QString &Path, const QString &Filter, int option);
private:
public:
explicit CWorkerThread(QObject *parent = nullptr);
int GetError() const;
public slots:
void Search(const QString &Path, const QString &Filter, int option);
void Cancel();
signals:
void result(int isFile, QString DirName, QString FileName);
void resultCancel();
void resultDone(QString strItemCount);
void processDone();
};
#endif // CWORKERTHREAD_H