|
HAL
|
Creates Icons from svg data. More...
#include <svg_icon_engine.h>
Public Member Functions | |
| SvgIconEngine (const QByteArray &dataEnabled, const QByteArray &dataDisabled) | |
| 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 |
Public Member Functions inherited from QIconEngine | |
| QIconEngine () | |
| virtual | ~QIconEngine () |
| virtual QSize | actualSize (const QSize &size, QIcon::Mode mode, QIcon::State state) |
| virtual void | addPixmap (const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state) |
| virtual void | addFile (const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state) |
| virtual QString | key () const const |
| virtual bool | read (QDataStream &in) |
| virtual bool | write (QDataStream &out) const const |
| virtual QList< QSize > | availableSizes (QIcon::Mode mode, QIcon::State state) const const |
| virtual QString | iconName () const const |
| bool | isNull () const const |
| QPixmap | scaledPixmap (const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) |
| virtual void | virtual_hook (int id, void *data) |
Additional Inherited Members | |
Public Types inherited from QIconEngine | |
| enum | IconEngineHook |
Public Attributes inherited from QIconEngine | |
| AvailableSizesHook | |
| IconNameHook | |
| IsNullHook | |
| ScaledPixmapHook | |
Creates Icons from svg data.
The SvgIconEngine is a QIconEngine that is used for create QIcons from given svg data.
Definition at line 38 of file svg_icon_engine.h.
|
explicit |
Constructor.
| svg_data | - The svg data to create the QIcon from |
Definition at line 8 of file svg_icon_engine.cpp.
Referenced by clone().
|
overridevirtual |
Returns a clone of this icon engine
Implements QIconEngine.
Definition at line 21 of file svg_icon_engine.cpp.
References SvgIconEngine().
|
overridevirtual |
Uses the given painter to paint the icon into the rectangle rect. Mode and state are unused.
| painter | - The painter to paint the icon with |
| rect | - The rectangle to draw the icon in |
| mode | - The mode (unused) |
| state | - The state (unused) |
Implements QIconEngine.
Definition at line 12 of file svg_icon_engine.cpp.
References QIcon::Disabled, QByteArray::isEmpty(), and hal::state.
Referenced by pixmap().
|
overridevirtual |
Returns the icon as a pixmap with the required size. Mode and state are unused.
| size | - The size of the pixmap |
| mode | - The mode (unused) |
| state | - The state (unused) |
Reimplemented from QIconEngine.
Definition at line 26 of file svg_icon_engine.cpp.
References QImage::fill(), QImage::Format_ARGB32, QPixmap::fromImage(), Qt::NoFormatConversion, paint(), and hal::state.