com.trolltech.qt.gui
Class QIconEnginePluginV2

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.core.QObject
              extended by com.trolltech.qt.gui.QIconEnginePluginV2
All Implemented Interfaces:
QAbstractFactoryInterface, QAbstractIconEngineFactoryV2Interface, QtJambiInterface

public abstract class QIconEnginePluginV2
extends QObject
implements QAbstractIconEngineFactoryV2Interface, QAbstractFactoryInterface

The QIconEnginePluginV2 class provides an abstract base for custom QIconEngineV2 plugins. Icon engine plugins produces QIconEngines for QIcons; an icon engine is used to render the icon. The keys that identifies the engines the plugin can create are suffixes of icon filenames; they are returned by keys(). The create() function receives the icon filename to return an engine for; it should return 0 if it cannot produce an engine for the file.

Writing an icon engine plugin is achieved by inheriting QIconEnginePluginV2, reimplementing keys() and create(), and adding the Q_EXPORT_PLUGIN2() macro.

You should ensure that you do not duplicate keys. Qt will query the plugins for icon engines in the order in which the plugins are found during plugin search (see the plugins overview document).

See also:
How to Create Qt Plugins.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QtJambiObject
QtJambiObject.QPrivateConstructor
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
Constructor Summary
  QIconEnginePluginV2()
          Constructs a icon engine plugin with the given parent.
  QIconEnginePluginV2(QObject parent)
          Constructs a icon engine plugin with the given parent.
protected QIconEnginePluginV2(QtJambiObject.QPrivateConstructor p)
          This method is internal to Qt Jambi.
 
Method Summary
 long __qt_cast_to_QAbstractFactory(long ptr)
          This method is internal to Qt Jambi.
 long __qt_cast_to_QAbstractIconEngineFactoryV2(long ptr)
          This method is internal to Qt Jambi.
abstract  QIconEngineV2 create(java.lang.String filename)
          Creates and returns a QIconEngine object for the icon with the given filename.
static QIconEnginePluginV2 fromNativePointer(QNativePointer nativePointer)
          This method returns the QIconEnginePluginV2 instance pointed to by nativePointer.
abstract  java.util.List<java.lang.String> keys()
          Returns a list of icon engine keys that this plugin supports.
 
Methods inherited from class com.trolltech.qt.core.QObject
blockSignals, childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, toString, userProperty
 
Methods inherited from class com.trolltech.qt.QtJambiObject
disableGarbageCollection, dispose, disposed, equals, finalize, nativeId, nativePointer, reassignNativeResources, reenableGarbageCollection, setJavaOwnership, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
__qt_signalInitialization, disconnect, disconnect, signalSender
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QIconEnginePluginV2

public QIconEnginePluginV2()
Constructs a icon engine plugin with the given parent. This is invoked automatically by the Q_EXPORT_PLUGIN2() macro.


QIconEnginePluginV2

public QIconEnginePluginV2(QObject parent)
Constructs a icon engine plugin with the given parent. This is invoked automatically by the Q_EXPORT_PLUGIN2() macro.


QIconEnginePluginV2

protected QIconEnginePluginV2(QtJambiObject.QPrivateConstructor p)
This method is internal to Qt Jambi.

Method Detail

create

public abstract QIconEngineV2 create(java.lang.String filename)
Creates and returns a QIconEngine object for the icon with the given filename.

See also:
keys().

Specified by:
create in interface QAbstractIconEngineFactoryV2Interface

keys

public abstract java.util.List<java.lang.String> keys()
Returns a list of icon engine keys that this plugin supports. The keys correspond to the suffix of the file or resource name used when the plugin was created. Keys are case insensitive.

See also:
create().

Specified by:
keys in interface QAbstractFactoryInterface
Specified by:
keys in interface QAbstractIconEngineFactoryV2Interface

fromNativePointer

public static QIconEnginePluginV2 fromNativePointer(QNativePointer nativePointer)
This method returns the QIconEnginePluginV2 instance pointed to by nativePointer.


__qt_cast_to_QAbstractIconEngineFactoryV2

public long __qt_cast_to_QAbstractIconEngineFactoryV2(long ptr)
This method is internal to Qt Jambi.

Specified by:
__qt_cast_to_QAbstractIconEngineFactoryV2 in interface QAbstractIconEngineFactoryV2Interface

__qt_cast_to_QAbstractFactory

public long __qt_cast_to_QAbstractFactory(long ptr)
This method is internal to Qt Jambi.

Specified by:
__qt_cast_to_QAbstractFactory in interface QAbstractFactoryInterface


../com/trolltech/qt/gui/QAbstractIconEngineFactoryV2Interface.html#__qt_cast_to_QAbstractIconEngineFactoryV2(long)">__qt_cast_to_QAbstractIconEngineFactoryV2 in interface QAbstractIconEngineFactoryV2Interface

__qt_cast_to_QAbstractFactory

public long __qt_cast_to_QAbstractFactory(long ptr)
This method is internal to Qt Jambi.

Specified by:
__qt_cast_to_QAbstractFactory in interface QAbstractFactoryInterface