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