mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-29 10:26:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			36 lines
		
	
	
	
		
			780 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
	
		
			780 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #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
 |