qmlfrontend/preview_image_provider.h
author raptor <buckyballreaction@gmail.com>
Tue, 13 Aug 2019 13:20:28 -0600
branch0.9.25
changeset 15353 9a545985360b
parent 14175 8354b390f1a2
permissions -rw-r--r--
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies

#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