1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 03:39:14 +00:00
OpenMW/components/misc/scalableicon.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
780 B
C++
Raw Normal View History

2024-04-25 07:57:43 +00:00
#ifndef SCALABLEICON_HPP
#define SCALABLEICON_HPP
#include <QIconEngine>
#include <QProcess>
#include <QString>
#include <QStringList>
namespace Misc
{
class ScalableIcon : public QIconEngine
{
public:
QIconEngine* clone() const override;
QPixmap pixmap(const QSize& size, QIcon::Mode mode, QIcon::State state) override;
void paint(QPainter* painter, const QRect& rect, QIcon::Mode mode, QIcon::State state) override;
static void updateAllIcons();
virtual ~ScalableIcon();
static QIcon load(const QString& fileName);
private:
explicit ScalableIcon(const QByteArray& svgContent);
void update();
QByteArray mTemplate;
QByteArray mContent;
};
}
#endif // SCALABLEICON_HPP