qmlFrontend/previewimageprovider.cpp
branchqmlfrontend
changeset 10420 02c573d19224
child 10424 4be6cd55f1cf
equal deleted inserted replaced
10418:091d2c0216c3 10420:02c573d19224
       
     1 #include "previewimageprovider.h"
       
     2 
       
     3 PreviewImageProvider::PreviewImageProvider()
       
     4         : QQuickImageProvider(QQuickImageProvider::Pixmap)
       
     5 {
       
     6 }
       
     7 
       
     8 QPixmap PreviewImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
       
     9 {
       
    10     Q_UNUSED(id);
       
    11     Q_UNUSED(requestedSize);
       
    12 
       
    13     if (size)
       
    14         *size = m_px.size();
       
    15 
       
    16     return m_px;
       
    17 }
       
    18 
       
    19 void PreviewImageProvider::setPixmap(const QPixmap & px)
       
    20 {
       
    21     m_px = px;
       
    22 }