45 #include "OpenFlipperThread.hh" 49 OpenFlipperThread::OpenFlipperThread( QString _jobId ) :
55 OpenFlipperThread::~OpenFlipperThread() {
70 connect(job_, SIGNAL(process(QString)),
this,SIGNAL(
function(QString) ),Qt::DirectConnection);
73 connect(job_, SIGNAL(finished()),
this,SLOT(slotJobFinished() ) );
76 connect(
this,SIGNAL(startProcessingInternal()),job_,SLOT(startJobProcessing()),Qt::QueuedConnection);
96 std::cerr <<
"Cancel not implemented" << std::endl;
100 std::cerr <<
"Thread : cancel received" << std::endl;
101 if ( _jobId == jobId_ )
106 emit finished( jobId_ );
118 emit startProcessingInternal();
121 OpenFlipperJob::~OpenFlipperJob()
129 emit process(jobId_);
virtual void cancel()
Cancel the job.
void run()
Main processing.
void startProcessing()
start processing
void slotJobFinished()
job has finished
void startJobProcessing()
slot to start processing
void slotCancel(QString _jobId)
Cancel this job.
Internal Job execution object.
QString jobId()
get JobId get the Id of the current Job