summaryrefslogtreecommitdiffstats
path: root/job.h
blob: e7b824d407c0d849581e37f702f7eba879df15d2 (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
#ifndef JOB_H
#define JOB_H

#include "video.h"
#include <QObject>
#include <QFutureWatcher>
class QWidget;

class Job : public QObject
{
	Q_OBJECT
public:
	void runJob();
	virtual Video::Jobs jobType() const = 0;
	QWidget* widget();
protected:
	Job(QObject *parent = 0);
	virtual bool executeJob() = 0;
	virtual QWidget* gui() = 0;
private:
	QFutureWatcher<bool> *m_watcher;
	QWidget *m_gui;
private slots:
	void jobFinished();
signals:
	void completed(bool result);
};

#endif // JOB_H