com.trolltech.qt.gui
Class QIconEngineV2

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.gui.QIconEngine
                  extended by com.trolltech.qt.gui.QIconEngineV2
All Implemented Interfaces:
QtJambiInterface

public abstract class QIconEngineV2
extends QIconEngine

The QIconEngineV2 class provides an abstract base class for QIcon renderers. An icon engine renders QIcons. With icon engines, you can customize icons. Qt provides a default engine that makes icons adhere to the current style by scaling the icons and providing a disabled appearance.

An engine is installed on an icon either through a QIcon constructor or through a QIconEnginePluginV2. The plugins are used by Qt if a specific engine is not given when the icon is created. See the QIconEngineV2 class description to learn how to create icon engine plugins.

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.

QIconEngineV2 extends the API of QIconEngine to allow streaming of the icon engine contents, and should be used instead of QIconEngine for implementing new icon engines.

See also:
QIconEnginePluginV2.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.PrivateSignal0, QSignalEmitter.PrivateSignal1, QSignalEmitter.PrivateSignal2, QSignalEmitter.PrivateSignal3, QSignalEmitter.PrivateSignal4, QSignalEmitter.PrivateSignal5, QSignalEmitter.PrivateSignal6, QSignalEmitter.PrivateSignal7, QSignalEmitter.PrivateSignal8, QSignalEmitter.PrivateSignal9, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
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
QIconEngineV2()
          This is an overloaded method provided for convenience.
 
Method Summary
 java.util.List availableSizes()
          Returns sizes of all images that are contained in the engine for the specific mode and state.
 java.util.List availableSizes(QIcon.Mode mode)
          Returns sizes of all images that are contained in the engine for the specific mode and state.
 java.util.List availableSizes(QIcon.Mode mode, QIcon.State state)
          Returns sizes of all images that are contained in the engine for the specific mode and state.
 QIconEngineV2 clone()
          This method is reimplemented for internal reasons
 java.lang.String key()
          Returns a key that identifies this icon engine.
 boolean read(QDataStream in)
          Reads icon engine contents from the QDataStreamin.
 boolean write(QDataStream out)
          Writes the contents of this engine to the QDataStreamout.
 
Methods inherited from class com.trolltech.qt.gui.QIconEngine
actualSize, addFile, addPixmap, paint, pixmap
 
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
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QIconEngineV2

public QIconEngineV2()
This is an overloaded method provided for convenience.

Method Detail

availableSizes

public final java.util.List availableSizes(QIcon.Mode mode)
Returns sizes of all images that are contained in the engine for the specific mode and state.

Note: This is a helper method and the actual work is done by virtual_hook() method, hence this method depends on icon engine support and may not work with all icon engines.


availableSizes

public final java.util.List availableSizes()
Returns sizes of all images that are contained in the engine for the specific mode and state.

Note: This is a helper method and the actual work is done by virtual_hook() method, hence this method depends on icon engine support and may not work with all icon engines.


availableSizes

public final java.util.List availableSizes(QIcon.Mode mode,
                                           QIcon.State state)
Returns sizes of all images that are contained in the engine for the specific mode and state.

Note: This is a helper method and the actual work is done by virtual_hook() method, hence this method depends on icon engine support and may not work with all icon engines.


clone

public QIconEngineV2 clone()
This method is reimplemented for internal reasons

Overrides:
clone in class java.lang.Object

key

public java.lang.String key()
Returns a key that identifies this icon engine.


read

public boolean read(QDataStream in)
Reads icon engine contents from the QDataStreamin. Returns true if the contents were read; otherwise returns false.

QIconEngineV2's default implementation always return false.


write

public boolean write(QDataStream out)
Writes the contents of this engine to the QDataStreamout. Returns true if the contents were written; otherwise returns false.

QIconEngineV2's default implementation always return false.