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