|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.gui.QStylePlugin
public abstract class QStylePlugin
The QStylePlugin class provides an abstract base for custom QStyle plugins. QStylePlugin is a simple plugin interface that makes it easy to create custom styles that can be loaded dynamically into applications using the QStyleFactory class.
Writing a style plugin is achieved by subclassing this base class, reimplementing the pure virtual keys() and create() functions, and exporting the class using the Q_EXPORT_PLUGIN2() macro. See How to Create Qt Plugins for details.
QStyleFactory, and QStyle.
| 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 | |
|---|---|
|
QStylePlugin()
Constructs a style plugin with the given parent. |
|
QStylePlugin(QObject parent)
Constructs a style plugin with the given parent. |
protected |
QStylePlugin(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_QAbstractStyleFactory(long ptr)
This method is internal to Qt Jambi. |
abstract QStyle |
create(java.lang.String key)
Creates and returns a QStyle object for the given style key. |
static QStylePlugin |
fromNativePointer(QNativePointer nativePointer)
|
abstract java.util.List<java.lang.String> |
keys()
Returns the list of style keys 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 |
|---|
public QStylePlugin()
Note that this constructor is invoked automatically by the Q_EXPORT_PLUGIN2() macro, so there is no need for calling it explicitly.
public QStylePlugin(QObject parent)
Note that this constructor is invoked automatically by the Q_EXPORT_PLUGIN2() macro, so there is no need for calling it explicitly.
protected QStylePlugin(QtJambiObject.QPrivateConstructor p)
| Method Detail |
|---|
public abstract QStyle create(java.lang.String key)
QStyle object for the given style key. If a plugin cannot create a style, it should return 0 instead. The style key is usually the class name of the required style. Note that the keys are case insensitive. For example:
List<String> keys()
{
List<String> keyList = new Vector<String>();
keyList.add("Rocket");
keyList.add("StarBuster");
return keyList;
}
QStyle create(String key)
{
String lcKey = key;
if (lcKey.equals("rocket")) {
return new RocketStyle();
} else if (lcKey.equals("starbuster")) {
return new StarBusterStyle();
}
return null;
}
keys().
create in interface QAbstractStyleFactoryInterfacepublic abstract java.util.List<java.lang.String> keys()
These keys are usually the class names of the custom styles that are implemented in the plugin.
create().
keys in interface QAbstractFactoryInterfacekeys in interface QAbstractStyleFactoryInterfacepublic static QStylePlugin fromNativePointer(QNativePointer nativePointer)
public long __qt_cast_to_QAbstractStyleFactory(long ptr)
__qt_cast_to_QAbstractStyleFactory in interface QAbstractStyleFactoryInterfacepublic long __qt_cast_to_QAbstractFactory(long ptr)
__qt_cast_to_QAbstractFactory in interface QAbstractFactoryInterface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||