2022-05-27 09:26:03 +02:00
|
|
|
#ifndef IPCPREVIEWWORKER_H
|
|
|
|
#define IPCPREVIEWWORKER_H
|
|
|
|
#include <QLocalSocket>
|
|
|
|
#include <QFutureWatcher>
|
|
|
|
#include "renderconfig.h"
|
|
|
|
#include "rendertarget.h"
|
|
|
|
#include "previewgenerator.h"
|
|
|
|
|
|
|
|
class IPCPreviewWorker : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
private:
|
|
|
|
QFutureWatcher<QByteArray> previewWorkerWatcher;
|
2022-08-27 10:21:58 +02:00
|
|
|
QLocalSocket *peer;
|
|
|
|
bool cleaned = false;
|
2022-05-27 09:26:03 +02:00
|
|
|
|
|
|
|
public:
|
2022-08-27 10:21:58 +02:00
|
|
|
IPCPreviewWorker(QLocalSocket *peer);
|
|
|
|
void start(RenderConfig config, const QVector<RenderTarget> &targets);
|
2022-05-28 17:24:42 +02:00
|
|
|
void stop();
|
2022-08-27 10:21:58 +02:00
|
|
|
private slots:
|
|
|
|
void shutdownSocket();
|
|
|
|
|
2022-05-28 17:24:42 +02:00
|
|
|
signals:
|
|
|
|
void finished();
|
2022-05-27 09:26:03 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // IPCPREVIEWWORKER_H
|