qmlFrontend/previewimageprovider.h
author unc0rr
Mon, 22 Sep 2014 02:10:39 +0400
branchqmlfrontend
changeset 10420 02c573d19224
child 10424 4be6cd55f1cf
permissions -rw-r--r--
flib: - Ability to pass raw data via IPC qmlfrontend: - Pass message received by callback through event loop to handle it in main thread - Get preview image from engine on button click and render it in Image object

#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 QPixmap & px);

private:
    QPixmap m_px;
};

#endif // PREVIEWIMAGEPROVIDER_H