cutter/src/analthread.cpp

35 lines
544 B
C++
Raw Normal View History

#include "analthread.h"
#include "iaitorcore.h"
#include <QDebug>
AnalThread::AnalThread(QWidget *parent) :
QThread(parent),
core(nullptr),
level(2)
{
}
AnalThread::~AnalThread()
{
2017-04-09 19:55:06 +00:00
if (isRunning())
{
quit();
wait();
}
}
void AnalThread::start(IaitoRCore *core, int level)
{
this->core = core;
this->level = level;
QThread::start();
}
// run() will be called when a thread starts
void AnalThread::run()
{
//qDebug() << "Anal level: " << this->level;
core->analyze(this->level);
}