QDecorationPlugin Class

The QDecorationPlugin class is an abstract base class for window decoration plugins in Qt for Embedded Linux. 更多...

頭: #include <QDecorationPlugin>
繼承: QObject

公共函數

QDecorationPlugin (QObject * parent = 0)
~QDecorationPlugin ()

重實現公共函數

virtual QDecoration * create (const QString & key ) = 0
virtual QStringList keys () const = 0

額外繼承成員

詳細描述

The QDecorationPlugin class is an abstract base class for window decoration plugins in Qt for Embedded Linux.

注意,此類隻可用於 Qt for Embedded Linux .

Qt for Embedded Linux provides three ready-made decoration styles: 默認 , Styled and Windows . Custom decorations can be implemented by subclassing the QDecoration class and creating a decoration plugin.

A decoration plugin can be created by subclassing QDecorationPlugin and implementing the pure virtual keys () 和 create () functions. By exporting the derived class using the Q_EXPORT_PLUGIN2 () macro, the default implementation of the QDecorationFactory class will automatically detect the plugin and load the driver into the application at run-time. See 如何創建 Qt 插件 瞭解細節。

To actually apply a decoration, use the QApplication::qwsSetDecoration () 函數。

另請參閱 QDecoration and QDecorationFactory .

成員函數文檔編製

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.

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

Creates a decoration matching the given key . Note that keys are case-insensitive.

另請參閱 keys ().

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

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

另請參閱 create ().