qmlfrontend/preview_image_provider.h
branchui-scaling
changeset 15288 c4fd2813b127
parent 14159 8354b390f1a2
equal deleted inserted replaced
13395:0135e64c6c66 15288:c4fd2813b127
       
     1 #ifndef PREVIEWIMAGEPROVIDER_H
       
     2 #define PREVIEWIMAGEPROVIDER_H
       
     3 
       
     4 #include <QPixmap>
       
     5 #include <QQuickImageProvider>
       
     6 #include <QSize>
       
     7 
       
     8 class PreviewImageProvider : public QQuickImageProvider {
       
     9  public:
       
    10   PreviewImageProvider();
       
    11 
       
    12   QPixmap requestPixmap(const QString &id, QSize *size,
       
    13                         const QSize &requestedSize);
       
    14 
       
    15   void setImage(const QImage &preview);
       
    16 
       
    17  private:
       
    18   QPixmap m_px;
       
    19 };
       
    20 
       
    21 #endif  // PREVIEWIMAGEPROVIDER_H