Kstars

imageprovider.cpp
1/*
2 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
3 SPDX-License-Identifier: GPL-2.0-or-later
4*/
5#include "imageprovider.h"
6
7ImageProvider::ImageProvider() : QQuickImageProvider(QQmlImageProviderBase::Image)
8{
9}
10
11QImage ImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize)
12{
13 Q_UNUSED(size)
14 Q_UNUSED(requestedSize)
15 return images.value(id);
16}
17
19{
20 images.insert(id, image);
21}
virtual QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) override
Get image by id.
void addImage(const QString &id, QImage image)
Add image to the list of images with the given id.
iterator insert(const Key &key, const T &value)
T value(const Key &key) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.