cutter/src/common/SvgIconEngine.h

26 lines
635 B
C
Raw Normal View History

2017-12-03 16:26:01 +00:00
#ifndef SVGICONENGINE_H
#define SVGICONENGINE_H
#include <QIconEngine>
2019-02-01 15:14:11 +00:00
#include <QPalette>
2017-12-03 16:26:01 +00:00
class SvgIconEngine: public QIconEngine
{
private:
QByteArray svgData;
public:
explicit SvgIconEngine(const QString &filename);
2019-02-01 15:14:11 +00:00
SvgIconEngine(const QString &filename, const QColor &tintColor);
SvgIconEngine(const QString &filename, QPalette::ColorRole colorRole);
2017-12-03 16:26:01 +00:00
void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) override;
QIconEngine *clone() const override;
QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) override;
};
#endif //SVGICONENGINE_H