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.

Public Functions

Additional Inherited Members


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().


Copyright © 2006 Trolltech Trademarks
Qt 4.1.3