You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
534 B
25 lines
534 B
4 years ago
|
#ifndef COLORIMAGEPROVIDER_H
|
||
|
#define COLORIMAGEPROVIDER_H
|
||
|
|
||
|
#include <QImage>
|
||
|
#include <QQuickImageProvider>
|
||
|
#include <QDebug>
|
||
|
|
||
|
class ColorImageProvider : public QQuickImageProvider
|
||
|
{
|
||
|
public:
|
||
|
ColorImageProvider();
|
||
|
|
||
|
QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override;
|
||
|
void setPic(QPixmap pixmap, quint32 width, quint32 height);
|
||
|
|
||
|
static ColorImageProvider* getInstance();
|
||
|
|
||
|
private:
|
||
|
QPixmap _pixmap;
|
||
|
static ColorImageProvider* _instance;
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif
|