2017-03-29 10:18:37 +00:00
|
|
|
#ifndef ANALTHREAD_H
|
|
|
|
#define ANALTHREAD_H
|
|
|
|
|
|
|
|
#include <QThread>
|
|
|
|
|
2017-09-25 12:55:41 +00:00
|
|
|
class CutterCore;
|
2017-09-28 22:04:57 +00:00
|
|
|
class MainWindow;
|
|
|
|
class OptionsDialog;
|
2017-03-29 10:18:37 +00:00
|
|
|
|
|
|
|
class AnalThread : public QThread
|
|
|
|
{
|
2017-04-09 19:55:06 +00:00
|
|
|
Q_OBJECT
|
2017-03-29 10:18:37 +00:00
|
|
|
public:
|
2018-05-04 07:58:32 +00:00
|
|
|
explicit AnalThread(OptionsDialog *parent = nullptr);
|
2017-03-31 22:43:12 +00:00
|
|
|
~AnalThread();
|
|
|
|
|
2017-09-28 22:04:57 +00:00
|
|
|
void start(MainWindow *main, int level, QList<QString> advanced);
|
2018-03-09 12:57:57 +00:00
|
|
|
void interruptAndWait();
|
|
|
|
|
2018-03-21 20:32:32 +00:00
|
|
|
bool isInterrupted()
|
|
|
|
{
|
|
|
|
return interrupted;
|
|
|
|
}
|
2017-03-31 22:43:12 +00:00
|
|
|
|
|
|
|
protected:
|
2017-03-29 10:18:37 +00:00
|
|
|
void run();
|
|
|
|
|
2017-03-31 22:43:12 +00:00
|
|
|
using QThread::start;
|
2017-03-29 10:18:37 +00:00
|
|
|
|
2017-09-28 22:04:57 +00:00
|
|
|
signals:
|
|
|
|
void updateProgress(QString str);
|
2018-05-08 20:44:53 +00:00
|
|
|
void openFileFailed();
|
2017-09-28 22:04:57 +00:00
|
|
|
|
2017-03-31 22:43:12 +00:00
|
|
|
private:
|
|
|
|
int level;
|
2017-07-24 11:05:28 +00:00
|
|
|
QList<QString> advanced;
|
2017-09-28 22:04:57 +00:00
|
|
|
MainWindow *main;
|
2018-03-09 12:57:57 +00:00
|
|
|
|
|
|
|
bool interrupted;
|
2017-03-29 10:18:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ANALTHREAD_H
|