|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# QDecorationPlugin Class Reference
[QtGui module]

The QDecorationPlugin class is an abstract base class for decoration plugins. More...

    #include <QDecorationPlugin>

Inherits QObject.

- List of all members, including inherited members

### Public Functions

- QDecorationPlugin ( QObject * parent = 0 )
- ~QDecorationPlugin ()
- virtual QDecoration * create ( const QString & key ) = 0
- virtual QStringList keys () const = 0

- 28 public functions inherited from QObject

### Additional Inherited Members

- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 1 signal inherited from QObject
- 4 static public members inherited from QObject
- 7 protected functions inherited from QObject

## Detailed Description

The QDecorationPlugin class is an abstract base class for decoration plugins.

Note that this class is only available in Qtopia Core.

QDecorationPlugin is a simple plugin interface that makes it easy to create custom decorations that can be loaded dynamically into applications using the QDecorationFactory class.

Writing a decoration plugin is achieved by subclassing QDecorationPlugin, 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 QDecorationFactory and QDecoration.

## Member Function Documentation

### QDecorationPlugin::QDecorationPlugin ( QObject * parent = 0 )

Constructs a decoration 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.

### QDecorationPlugin::~QDecorationPlugin ()

Destroys the decoration plugin.

Note that Qt destroys a plugin automatically when it is no longer used, so there is no need for calling the destructor explicitly.

### QDecoration * QDecorationPlugin::create ( const QString & key ) `[pure virtual]`

Creates a QDecoration object for the given decoration key. Keys are case-insensitive.

See also keys().

### QStringList QDecorationPlugin::keys () const `[pure virtual]`

Returns the list of valid keys, i.e. the decoration keys supported by this plugin.

A key is usually the class name of a custom decoration. Qtopia Core currently supports the following decorations by default: `Default`, `Styled` and `Windows`.

See also create().