2022-12-08 14:09:33 +01:00
|
|
|
#pragma once
|
|
|
|
#include "IconList.h"
|
|
|
|
|
|
|
|
#include <QQuickImageProvider>
|
|
|
|
|
2023-08-22 16:30:38 +03:00
|
|
|
class IconImageProvider : public QQuickImageProvider {
|
|
|
|
public:
|
2022-12-08 14:09:33 +01:00
|
|
|
IconImageProvider(std::shared_ptr<IconList> iconList, int iconSize = 48);
|
|
|
|
|
2023-08-22 16:30:38 +03:00
|
|
|
QPixmap requestPixmap(const QString& id, QSize* size, const QSize& requestedSize) override;
|
2022-12-08 14:09:33 +01:00
|
|
|
|
2023-08-22 16:30:38 +03:00
|
|
|
private:
|
2022-12-08 14:09:33 +01:00
|
|
|
std::shared_ptr<IconList> m_iconList;
|
|
|
|
int m_iconSize;
|
|
|
|
};
|