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
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