Merge branch 'develop'
[clinton/Virtual-Jaguar-Rx.git] / src / gui / filethread.h
1 //
2 // filethread.h: File discovery thread class definition
3 //
4
5 #ifndef __FILETHREAD_H__
6 #define __FILETHREAD_H__
7
8 #include <QtCore/QtCore>
9 #include <QtGui/QImage>
10 #include <stdint.h>
11
12 class FileThread: public QThread
13 {
14 Q_OBJECT
15
16 public:
17 FileThread(QObject * parent = 0);
18 ~FileThread();
19 void Go(bool allowUnknown = false);
20
21 signals:
22 // void FoundAFile(unsigned long index); // JPM: Not used
23 // void FoundAFile2(unsigned long index, QString filename, QImage * label, unsigned long); // JPM: Not used
24 void FoundAFile3(unsigned long index, QString filename, QImage * label, unsigned long, bool, unsigned long, unsigned long);
25
26 protected:
27 void run(void);
28 void HandleFile(QFileInfo);
29 uint32_t FindCRCIndexInFileList(uint32_t);
30
31 private:
32 QMutex mutex;
33 QWaitCondition condition;
34 bool abort;
35 bool allowUnknownSoftware;
36 };
37
38 #endif // __FILETHREAD_H__