6#include <PhosphorServiceIconTheme/phosphorserviceicontheme_export.h>
29class PHOSPHORSERVICEICONTHEME_EXPORT IconThemeResolver :
public QObject
32 Q_DISABLE_COPY_MOVE(IconThemeResolver)
55 [[nodiscard]] QImage
iconForName(
const QString& name,
int size,
int scale = 1,
56 const QString& extraThemeDir = {})
const;
61 [[nodiscard]]
static QImage
decodePixmaps(
const QList<QPair<QSize, QByteArray>>& pixmaps,
int size);
67 explicit IconThemeResolver(QObject* parent =
nullptr);
68 ~IconThemeResolver()
override;
71 std::unique_ptr<Private> d;
void setThemeName(const QString &themeName)
Force a theme override.
QString themeName() const
QImage iconForName(const QString &name, int size, int scale=1, const QString &extraThemeDir={}) const
Look up an icon by name.
static IconThemeResolver * instance()
Process-wide singleton. Created lazily on first call.
static QImage decodePixmaps(const QList< QPair< QSize, QByteArray > > &pixmaps, int size)
Bypass theme lookup and decode a raw IconPixmap byte stream straight off the wire (ARGB32 in network ...
Definition IconImageProvider.h:14