|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.gui.QIconEngine
public abstract class QIconEngine
The QIconEngine class provides an abstract base class for QIcon
renderers. Use QIconEngineV2
instead.
An icon engine provides the rendering functions for a QIcon
. Each icon has a corresponding icon engine that is responsible for drawing the icon with a requested size, mode and state.
The icon is rendered by the paint()
function, and the icon can additionally be obtained as a pixmap with the pixmap()
function (the default implementation simply uses paint()
to achieve this). The addPixmap()
function can be used to add new pixmaps to the icon engine, and is used by QIcon
to add specialized custom pixmaps.
The paint()
, pixmap()
, and addPixmap()
functions are all virtual, and can therefore be reimplemented in subclasses of QIconEngine.
QIconEngineV2
, and QIconEnginePlugin.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
QIconEngine()
This is an overloaded method provided for convenience. |
Method Summary | |
---|---|
QSize |
actualSize(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. |
void |
addFile(java.lang.String fileName,
QSize size,
QIcon.Mode mode,
QIcon.State state)
Called by QIcon::addFile() . |
void |
addPixmap(QPixmap pixmap,
QIcon.Mode mode,
QIcon.State state)
Called by QIcon::addPixmap() . |
abstract void |
paint(QPainter painter,
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. |
QPixmap |
pixmap(QSize size,
QIcon.Mode mode,
QIcon.State state)
Returns the icon as a pixmap with the required size, mode, and state. |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QIconEngine()
Method Detail |
---|
public QSize actualSize(QSize size, QIcon.Mode mode, QIcon.State state)
public void addFile(java.lang.String fileName, QSize size, QIcon.Mode mode, QIcon.State state)
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.
public void addPixmap(QPixmap pixmap, QIcon.Mode mode, QIcon.State state)
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.
public abstract void paint(QPainter painter, QRect rect, QIcon.Mode mode, QIcon.State state)
public QPixmap pixmap(QSize size, QIcon.Mode mode, QIcon.State state)
paint()
to fill it.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |