1 //=============================================================================
2 //  MuseScore
3 //  Music Composition & Notation
4 //
5 //  Copyright (C) 2011 Werner Schweer and others
6 //
7 //  This program is free software; you can redistribute it and/or modify
8 //  it under the terms of the GNU General Public License version 2
9 //  as published by the Free Software Foundation and appearing in
10 //  the file LICENSE.GPL
11 //=============================================================================
12 
13 // this is a modified version of qt QSvgIconEngine
14 
15 #ifndef __MICONENGINE_H__
16 #define __MICONENGINE_H__
17 
18 #include <QtGui/qiconengine.h>
19 #include <QtCore/qshareddata.h>
20 
21 class MIconEnginePrivate;
22 
23 //---------------------------------------------------------
24 //   MIconEngine
25 //---------------------------------------------------------
26 
27 class MIconEngine : public QIconEngine
28       {
29    public:
30       MIconEngine();
31       MIconEngine(const MIconEngine &other);
32       ~MIconEngine();
33       void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state);
34       QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state);
35       QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state);
36 
37       void addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state);
38       void addFile(const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state);
39 
40       QString key() const;
41       QIconEngine *clone() const;
42 
43    private:
44       QSharedDataPointer<MIconEnginePrivate> d;
45       };
46 
47 #endif
48