The QIconEnginePlugin class provides an abstract base for custom QIconEngine 插件。 更多...
| 头: | #include <QIconEnginePlugin> |
| 继承: | QObject |
| QIconEnginePlugin (QObject * parent = 0) | |
| ~QIconEnginePlugin () |
| virtual QIconEngine * | create (const QString & filename ) = 0 |
| virtual QStringList | keys () const = 0 |
The QIconEnginePlugin class provides an abstract base for custom QIconEngine 插件。
使用 QIconEnginePluginV2 代替。
The icon engine plugin is a simple plugin interface that makes it easy to create custom icon engines that can be loaded dynamically into applications through QIcon . QIcon uses the file or resource name's suffix to determine what icon engine to use.
Writing a icon engine plugin is achieved by subclassing this base class, reimplementing the pure virtual functions keys () 和 create (),和导出类采用 Q_EXPORT_PLUGIN2 () 宏。
另请参阅 如何创建 Qt 插件 .
Constructs a icon engine plugin with the given parent . This is invoked automatically by the Q_EXPORT_PLUGIN2 () 宏。
Destroys the icon engine plugin.
从不需要明确调用这。Qt 自动销毁插件当不再使用时。
[pure virtual]
QIconEngine
* QIconEnginePlugin::
create
(const
QString
&
filename
)
创建并返回 QIconEngine object for the icon with the given filename .
另请参阅 keys ().
[pure virtual]
QStringList
QIconEnginePlugin::
keys
() const
Returns a list of icon engine keys that this plugin supports. The keys correspond to the suffix of the file or resource name used when the plugin was created. Keys are case insensitive.
另请参阅 create ().