File indexing completed on 2024-10-06 03:30:32

0001 /*
0002     SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 #include "imageprovider.h"
0006 
0007 ImageProvider::ImageProvider() : QQuickImageProvider(QQmlImageProviderBase::Image)
0008 {
0009 }
0010 
0011 QImage ImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize)
0012 {
0013     Q_UNUSED(size)
0014     Q_UNUSED(requestedSize)
0015     return images.value(id);
0016 }
0017 
0018 void ImageProvider::addImage(const QString &id, QImage image)
0019 {
0020     images.insert(id, image);
0021 }