Qt 4.8
|
#include <qsvgiconengine.h>
Public Functions | |
QSize | actualSize (const QSize &size, QIcon::Mode mode, QIcon::State state) |
Returns the actual size of the icon the engine provides for the requested size, mode and state. More... | |
void | addFile (const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state) |
Called by QIcon::addFile(). More... | |
void | addPixmap (const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state) |
Called by QIcon::addPixmap(). More... | |
QIconEngineV2 * | clone () const |
Returns a clone of this icon engine. More... | |
QString | key () const |
Returns a key that identifies this icon engine. More... | |
void | paint (QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) |
Uses the given painter to paint the icon with the required mode and state into the rectangle rect. More... | |
QPixmap | pixmap (const QSize &size, QIcon::Mode mode, QIcon::State state) |
Returns the icon as a pixmap with the required size, mode, and state. More... | |
QSvgIconEngine () | |
QSvgIconEngine (const QSvgIconEngine &other) | |
bool | read (QDataStream &in) |
Reads icon engine contents from the QDataStream in. More... | |
bool | write (QDataStream &out) const |
Writes the contents of this engine to the QDataStream out. More... | |
~QSvgIconEngine () | |
Public Functions inherited from QIconEngineV2 | |
QList< QSize > | availableSizes (QIcon::Mode mode=QIcon::Normal, QIcon::State state=QIcon::Off) |
Returns sizes of all images that are contained in the engine for the specific mode and state. More... | |
QString | iconName () |
Returns the name used to create the engine, if available. More... | |
virtual void | virtual_hook (int id, void *data) |
Additional method to allow extending QIconEngineV2 without adding new virtual methods (and without breaking binary compatibility). More... | |
Public Functions inherited from QIconEngine | |
virtual | ~QIconEngine () |
Destroys the icon engine. More... | |
Properties | |
QSharedDataPointer< QSvgIconEnginePrivate > | d |
Additional Inherited Members | |
Public Types inherited from QIconEngineV2 | |
enum | IconEngineHook { AvailableSizesHook = 1, IconNameHook } |
These enum values are used for virtual_hook() to allow additional queries to icon engine without breaking binary compatibility. More... | |
Definition at line 54 of file qsvgiconengine.h.
QSvgIconEngine::QSvgIconEngine | ( | ) |
Definition at line 95 of file qsvgiconengine.cpp.
Referenced by clone().
QSvgIconEngine::QSvgIconEngine | ( | const QSvgIconEngine & | other | ) |
Definition at line 100 of file qsvgiconengine.cpp.
QSvgIconEngine::~QSvgIconEngine | ( | ) |
Definition at line 111 of file qsvgiconengine.cpp.
|
virtual |
Returns the actual size of the icon the engine provides for the requested size, mode and state.
The default implementation returns the given size.
Reimplemented from QIconEngine.
Definition at line 116 of file qsvgiconengine.cpp.
Referenced by pixmap().
|
virtual |
Called by QIcon::addFile().
Adds a specialized pixmap from the file with the given fileName, size, mode and state. The default pixmap-based engine stores any supplied file names, and it loads the pixmaps on demand instead of using scaled pixmaps if the size of a pixmap matches the size of icon requested. Custom icon engines that implement scalable vector formats are free to ignores any extra files.
Reimplemented from QIconEngine.
Definition at line 206 of file qsvgiconengine.cpp.
Referenced by QSvgIconPlugin::create().
|
virtual |
Called by QIcon::addPixmap().
Adds a specialized pixmap for the given mode and state. The default pixmap-based engine stores any supplied pixmaps, and it uses them instead of scaled pixmaps if the size of a pixmap matches the size of icon requested. Custom icon engines that implement scalable vector formats are free to ignores any extra pixmaps.
Reimplemented from QIconEngine.
Definition at line 196 of file qsvgiconengine.cpp.
Referenced by addFile().
|
virtual |
Returns a clone of this icon engine.
Reimplemented from QIconEngineV2.
Definition at line 243 of file qsvgiconengine.cpp.
|
virtual |
Returns a key that identifies this icon engine.
Reimplemented from QIconEngineV2.
Definition at line 238 of file qsvgiconengine.cpp.
Referenced by read(), and write().
|
virtual |
Uses the given painter to paint the icon with the required mode and state into the rectangle rect.
Implements QIconEngine.
Definition at line 232 of file qsvgiconengine.cpp.
|
virtual |
Returns the icon as a pixmap with the required size, mode, and state.
The default implementation creates a new pixmap and calls paint() to fill it.
Reimplemented from QIconEngine.
Definition at line 153 of file qsvgiconengine.cpp.
Referenced by actualSize(), addPixmap(), paint(), and read().
|
virtual |
Reads icon engine contents from the QDataStream in.
Returns true if the contents were read; otherwise returns false.
QIconEngineV2's default implementation always return false.
Reimplemented from QIconEngineV2.
Definition at line 249 of file qsvgiconengine.cpp.
|
virtual |
Writes the contents of this engine to the QDataStream out.
Returns true if the contents were written; otherwise returns false.
QIconEngineV2's default implementation always return false.
Reimplemented from QIconEngineV2.
Definition at line 307 of file qsvgiconengine.cpp.
|
private |
Definition at line 78 of file qsvgiconengine.h.
Referenced by actualSize(), addFile(), addPixmap(), pixmap(), QSvgIconEngine(), read(), and write().