qmlfrontend/previewimageprovider.h
author unc0rr
Tue, 02 Jan 2018 23:45:18 +0100
branchqmlfrontend
changeset 12876 b544bbbd0696
parent 12861 488782d9aba9
permissions -rw-r--r--
Break engine completely and make it render in frontend window (no actual rendering yet, just white screen)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10420
unc0rr
parents:
diff changeset
     1
#ifndef PREVIEWIMAGEPROVIDER_H
unc0rr
parents:
diff changeset
     2
#define PREVIEWIMAGEPROVIDER_H
unc0rr
parents:
diff changeset
     3
unc0rr
parents:
diff changeset
     4
#include <QQuickImageProvider>
unc0rr
parents:
diff changeset
     5
#include <QPixmap>
unc0rr
parents:
diff changeset
     6
#include <QSize>
unc0rr
parents:
diff changeset
     7
unc0rr
parents:
diff changeset
     8
class PreviewImageProvider : public QQuickImageProvider
unc0rr
parents:
diff changeset
     9
{
unc0rr
parents:
diff changeset
    10
public:
unc0rr
parents:
diff changeset
    11
    PreviewImageProvider();
unc0rr
parents:
diff changeset
    12
unc0rr
parents:
diff changeset
    13
    QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
unc0rr
parents:
diff changeset
    14
10424
4be6cd55f1cf - Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents: 10420
diff changeset
    15
    void setPixmap(const QByteArray & px);
10420
unc0rr
parents:
diff changeset
    16
unc0rr
parents:
diff changeset
    17
private:
unc0rr
parents:
diff changeset
    18
    QPixmap m_px;
unc0rr
parents:
diff changeset
    19
};
unc0rr
parents:
diff changeset
    20
unc0rr
parents:
diff changeset
    21
#endif // PREVIEWIMAGEPROVIDER_H