qmlfrontend/previewimageprovider.h
author unc0rr
Tue, 26 Dec 2017 01:36:58 +0100
branchqmlfrontend
changeset 12861 488782d9aba9
parent 10424 qmlFrontend/previewimageprovider.h@4be6cd55f1cf
permissions -rw-r--r--
Recreate uFLRunQueue in Qt, render previews

#ifndef PREVIEWIMAGEPROVIDER_H
#define PREVIEWIMAGEPROVIDER_H

#include <QQuickImageProvider>
#include <QPixmap>
#include <QSize>

class PreviewImageProvider : public QQuickImageProvider
{
public:
    PreviewImageProvider();

    QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);

    void setPixmap(const QByteArray & px);

private:
    QPixmap m_px;
};

#endif // PREVIEWIMAGEPROVIDER_H