Now that the SDK is completed, we can turn to the worker. The project is complex enough; we can refresh our memory with the mandelbrot-worker architecture:
We will start by implementing the Job class. Inside the mandelbrot-worker project, create a new C++ class named Job. Here is the Job.h content:
#include <QObject> #include <QRunnable> #include <QAtomicInteger> #include "JobRequest.h" #include "JobResult.h" class Job : public QObject, public QRunnable { Q_OBJECT public: explicit Job(const JobRequest& jobRequest, QObject *parent = 0); void run() override; signals: void jobCompleted(JobResult jobResult); ...