qmlfrontend/preview_image_provider.h
author raptor <buckyballreaction@gmail.com>
Tue, 13 Aug 2019 13:10:12 -0600
branch0.9.25
changeset 15331 93b43cf0b792
parent 14154 8354b390f1a2
permissions -rw-r--r--
Fix compiling on MacOS X by requiring c++11 standard. Building now requires MacOS X 10.8+ and CMake 3.9+

#ifndef PREVIEWIMAGEPROVIDER_H
#define PREVIEWIMAGEPROVIDER_H

#include <QPixmap>
#include <QQuickImageProvider>
#include <QSize>

class PreviewImageProvider : public QQuickImageProvider {
 public:
  PreviewImageProvider();

  QPixmap requestPixmap(const QString &id, QSize *size,
                        const QSize &requestedSize);

  void setImage(const QImage &preview);

 private:
  QPixmap m_px;
};

#endif  // PREVIEWIMAGEPROVIDER_H