summaryrefslogtreecommitdiffstats
path: root/src/copythread.h
blob: ce6be83204fe4bd536a80719461187fc1102c662 (plain) (blame)
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
#ifndef COPYTHREAD_H_
#define COPYTHREAD_H_

#include <QThread>
#include <QMetaType>

class QFile;

class CopyThread : public QThread {
	Q_OBJECT
public:
	CopyThread(QFile *file, QObject *parent = NULL);
	virtual ~CopyThread();
	void stop();

	enum LogMessageId {
		None,
		TestSequentialStart,
		TestRandomStart,
		TestFinished,
	};

protected:
	virtual void run();

private:
	QFile *_file;
	volatile bool _doStop;

signals:
	void logMessage(LogMessageId msgId, QString message);
};

Q_DECLARE_METATYPE(CopyThread::LogMessageId);

#endif /* COPYTHREAD_H_ */