qmlFrontend/previewimageprovider.cpp
author unc0rr
Fri, 26 Sep 2014 00:56:36 +0400
branchqmlfrontend
changeset 10422 4cf23d4c7624
parent 10420 02c573d19224
child 10424 4be6cd55f1cf
permissions -rw-r--r--
- Pages - Animations on buttons hovering

#include "previewimageprovider.h"

PreviewImageProvider::PreviewImageProvider()
        : QQuickImageProvider(QQuickImageProvider::Pixmap)
{
}

QPixmap PreviewImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
{
    Q_UNUSED(id);
    Q_UNUSED(requestedSize);

    if (size)
        *size = m_px.size();

    return m_px;
}

void PreviewImageProvider::setPixmap(const QPixmap & px)
{
    m_px = px;
}