Qt 4.8
|
#include <qicon_p.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... | |
QPixmapIconEngineEntry * | bestMatch (const QSize &size, QIcon::Mode mode, QIcon::State state, bool sizeOnly) |
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... | |
QPixmapIconEngine () | |
QPixmapIconEngine (const QPixmapIconEngine &) | |
bool | read (QDataStream &in) |
Reads icon engine contents from the QDataStream in. More... | |
void | virtual_hook (int id, void *data) |
Additional method to allow extending QIconEngineV2 without adding new virtual methods (and without breaking binary compatibility). More... | |
bool | write (QDataStream &out) const |
Writes the contents of this engine to the QDataStream out. More... | |
~QPixmapIconEngine () | |
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... | |
Public Functions inherited from QIconEngine | |
virtual | ~QIconEngine () |
Destroys the icon engine. More... | |
Private Functions | |
QPixmapIconEngineEntry * | tryMatch (const QSize &size, QIcon::Mode mode, QIcon::State state) |
Properties | |
QVector< QPixmapIconEngineEntry > | pixmaps |
Friends | |
QDataStream & | operator<< (QDataStream &s, const QIcon &icon) |
class | QIconThemeEngine |
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... | |
QPixmapIconEngine::QPixmapIconEngine | ( | ) |
QPixmapIconEngine::QPixmapIconEngine | ( | const QPixmapIconEngine & | other | ) |
Definition at line 137 of file qicon.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 306 of file qicon.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 333 of file qicon.cpp.
Referenced by read().
|
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 320 of file qicon.cpp.
QPixmapIconEngineEntry * QPixmapIconEngine::bestMatch | ( | const QSize & | size, |
QIcon::Mode | mode, | ||
QIcon::State | state, | ||
bool | sizeOnly | ||
) |
Definition at line 195 of file qicon.cpp.
Referenced by actualSize(), and pixmap().
|
virtual |
Returns a clone of this icon engine.
Reimplemented from QIconEngineV2.
Definition at line 372 of file qicon.cpp.
|
virtual |
Returns a key that identifies this icon engine.
Reimplemented from QIconEngineV2.
Definition at line 367 of file qicon.cpp.
Referenced by pixmap().
|
virtual |
Uses the given painter to paint the icon with the required mode and state into the rectangle rect.
Implements QIconEngine.
Definition at line 146 of file qicon.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 247 of file qicon.cpp.
Referenced by addFile(), addPixmap(), and paint().
|
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 377 of file qicon.cpp.
|
private |
Definition at line 181 of file qicon.cpp.
Referenced by addPixmap(), and bestMatch().
|
virtual |
Additional method to allow extending QIconEngineV2 without adding new virtual methods (and without breaking binary compatibility).
The actual action and format of data depends on id argument which is in fact a constant from IconEngineHook enum.
Reimplemented from QIconEngineV2.
Definition at line 425 of file qicon.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 408 of file qicon.cpp.
|
friend |
Definition at line 1096 of file qicon.cpp.
|
private |
Definition at line 131 of file qicon_p.h.
Referenced by addFile(), addPixmap(), operator<<(), pixmap(), read(), tryMatch(), virtual_hook(), and write().