Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QStylePlugin

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.core.QObject
                  com.trolltech.qt.gui.QStylePlugin

All Implemented Interfaces:
  QAbstractFactoryInterface, QAbstractStyleFactoryInterface, QtJambiInterface

    public abstract class QStylePlugin

extends QObject
implements QAbstractStyleFactoryInterface, QAbstractFactoryInterface

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.

See also:
  `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)` This method returns the QStylePlugin instance pointed to by `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

### QStylePlugin

    public QStylePlugin()

  Constructs a style plugin with the given `parent`.

  Note that this constructor is invoked automatically by the Q_EXPORT_PLUGIN2() macro, so there is no need for calling it explicitly.

### QStylePlugin

    public QStylePlugin(QObject parent)

  Constructs a style plugin with the given `parent`.

  Note that this constructor is invoked automatically by the Q_EXPORT_PLUGIN2() macro, so there is no need for calling it explicitly.

### QStylePlugin

    protected QStylePlugin(QtJambiObject.QPrivateConstructor p)

  This method is internal to Qt Jambi.

Method Detail

### create

    public abstract QStyle create(java.lang.String key)

  Creates and returns a `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;

          }

See also:
  `keys()`.

  Specified by:
    `create` in interface `QAbstractStyleFactoryInterface`

### keys

    public abstract java.util.List<java.lang.String> keys()

  Returns the list of style keys this plugin supports.

  These keys are usually the class names of the custom styles that are implemented in the plugin.

See also:
  `create()`.

  Specified by:
    `keys` in interface `QAbstractFactoryInterface`
  Specified by:
    `keys` in interface `QAbstractStyleFactoryInterface`

### fromNativePointer

    public static QStylePlugin fromNativePointer(QNativePointer nativePointer)

  This method returns the QStylePlugin instance pointed to by `nativePointer`.

### __qt_cast_to_QAbstractStyleFactory

    public long __qt_cast_to_QAbstractStyleFactory(long ptr)

  This method is internal to Qt Jambi.

  Specified by:
    `__qt_cast_to_QAbstractStyleFactory` in interface `QAbstractStyleFactoryInterface`

### __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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

cified by:
  `__qt_cast_to_QAbstractStyleFactory` in interface `QAbstractStyleFactoryInterface`

### __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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS