core/icon: add icon image provider

This commit is contained in:
outfoxxed 2024-04-05 17:54:51 -07:00
parent 8e530b6b77
commit d47a7f2cff
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
5 changed files with 31 additions and 1 deletions

View file

@ -0,0 +1,11 @@
#pragma once
#include <qpixmap.h>
#include <qquickimageprovider.h>
class IconImageProvider: public QQuickImageProvider {
public:
explicit IconImageProvider(): QQuickImageProvider(QQuickImageProvider::Pixmap) {}
QPixmap requestPixmap(const QString& id, QSize* size, const QSize& requestedSize) override;
};