The QPictureFormatPlugin class provides an abstract base for custom picture format plugins. 更多...
| 头: | #include <QPictureFormatPlugin> |
| 继承: | QObject |
该类已过时。 提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
| QPictureFormatPlugin (QObject * parent = 0) | |
| ~QPictureFormatPlugin () |
| virtual bool | installIOHandler (const QString & format ) = 0 |
| virtual QStringList | keys () const = 0 |
| virtual bool | loadPicture (const QString & format , const QString & fileName , QPicture * picture ) |
| virtual bool | savePicture (const QString & format , const QString & fileName , const QPicture & picture ) |
The QPictureFormatPlugin class provides an abstract base for custom picture format plugins.
The picture format plugin is a simple plugin interface that makes it easy to create custom picture formats that can be used transparently by applications.
Writing an picture format plugin is achieved by subclassing this base class, reimplementing the pure virtual functions keys (), loadPicture (), savePicture (),和 installIOHandler (),和导出类采用 Q_EXPORT_PLUGIN2 () 宏。
另请参阅 如何创建 Qt 插件 .
Constructs an picture format plugin with the given parent . This is invoked automatically by the Q_EXPORT_PLUGIN2 () 宏。
销毁图片格式插件。
从不需要明确调用这。Qt 自动销毁插件当不再使用时。
[pure virtual]
bool
QPictureFormatPlugin::
installIOHandler
(const
QString
&
format
)
Installs a QPictureIO picture I/O handler for the picture format format .
另请参阅 keys ().
[pure virtual]
QStringList
QPictureFormatPlugin::
keys
() const
Returns the list of picture formats this plugin supports.
另请参阅 installIOHandler ().
[虚拟]
bool
QPictureFormatPlugin::
loadPicture
(const
QString
&
format
, const
QString
&
fileName
,
QPicture
*
picture
)
Loads the picture stored in the file called fileName ,采用给定 format , into * picture . Returns true on success; otherwise returns false.
另请参阅 savePicture ().
[虚拟]
bool
QPictureFormatPlugin::
savePicture
(const
QString
&
format
, const
QString
&
fileName
, const
QPicture
&
picture
)
Saves the given picture into the file called fileName ,使用指定 format . Returns true on success; otherwise returns false.
另请参阅 loadPicture ().