qmlFrontend/previewimageprovider.h
author sheepluva
Sun, 01 May 2016 15:58:19 +0200
branchqmlfrontend
changeset 11786 0aa4b3d02cba
parent 10424 4be6cd55f1cf
permissions -rw-r--r--
qmlfrontend: tweak map preview a little in an attempt to buy back unC0Rr's <3

#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