#ifndef PREVIEW_ACCEPTOR_H
#define PREVIEW_ACCEPTOR_H
#include <QObject>
#include <QtQmlIntegration>
class QQmlEngine;
class PreviewImageProvider;
class QJSEngine;
class PreviewAcceptor : public QObject {
Q_OBJECT
QML_ELEMENT
QML_SINGLETON
public:
static PreviewAcceptor *create(QQmlEngine *engine, QJSEngine *jsEngine);
explicit PreviewAcceptor(QQmlEngine *engine, QObject *parent = nullptr);
public Q_SLOTS:
void setImage(const QImage &preview);
private:
PreviewImageProvider *m_previewProvider;
};
#endif // PREVIEW_ACCEPTOR_H