QWebPluginFactory Class Reference [QtWebKit module]
The QWebPluginFactory class creates plugins to be embedded into web pages. Далее...
#include <QWebPluginFactory> Унаследован от: QObject.
Этот класс был введён в Qt 4.4.
Открытые типы
Открытые функции
- QWebPluginFactory ( QObject * parent = 0 )
- virtual ~QWebPluginFactory ()
- virtual QObject * create ( const QString & mimeType, const QUrl & url, const QStringList & argumentNames, const QStringList & argumentValues ) const = 0
- virtual bool extension ( Extension extension, const ExtensionOption * option = 0, ExtensionReturn * output = 0 )
- virtual QList<Plugin> plugins () const = 0
- virtual void refreshPlugins ()
- virtual bool supportsExtension ( Extension extension ) const
- 29 открытых функций, унаследованных от QObject
Дополнительные унаследованные члены
- 1 свойство, унаследованное от QObject
- 1 открытый слот, унаследованный от QObject
- 1 сигнал, унаследованный от QObject
- 5 статических открытых членов, унаследованных от QObject
- 7 защищенных функций, унаследованных от QObject
Подробное описание
The QWebPluginFactory class creates plugins to be embedded into web pages.
QWebPluginFactory is a factory for creating plugins for QWebPage. A plugin factory can be installed on a QWebPage using QWebPage::setPluginFactory().
Note: The plugin factory is only used if plugins are enabled through QWebSettings.
You can provide a QWebPluginFactory by implementing the plugins() and the create() method. For plugins() it is necessary to describe the plugins the factory can create, including a description and the supported MIME types. The MIME types each plugin can handle should match the ones specified in in the HTML <object> tag.
The create() method is called if the requested MIME type is supported. The implementation has to return a new instance of the plugin requested for the given MIME type and the specified URL.
Описание типов-членов
enum QWebPluginFactory::Extension
This enum describes the types of extensions that the plugin factory can support. Before using these extensions, you should verify that the extension is supported by calling supportsExtension().
Currently there are no extensions.
Описание функций-членов
QWebPluginFactory::QWebPluginFactory ( QObject * parent = 0 )
Constructs a QWebPluginFactory with parent parent.
QWebPluginFactory::~QWebPluginFactory () [virtual]
Деструктор.
QObject * QWebPluginFactory::create ( const QString & mimeType, const QUrl & url, const QStringList & argumentNames, const QStringList & argumentValues ) const [pure virtual]
Implemented in subclasses to create a new plugin that can display content of the MIME type given by mimeType. The URL of the content is provided in url. The returned object should be a QWidget.
The HTML object element can provide parameters through the <param> tag. The name and the value attributes of these tags are specified by the argumentNames and argumentValues string lists.
Например:
<object type="application/x-pdf" data="http:
<param name="showTableOfContents" value="true" />
<param name="hideThumbnails" value="false" />
</object>
The above object element will result in a call to create() with the following arguments:
Parameter | Значение |
mimeType | "application/x-pdf" |
url | "http://www.example.com/document.pdf" |
argumentNames | "showTableOfContents" "hideThumbnails" |
argumentVaues | "true" "false" |
Note: Ownership of the returned object will be transferred to the caller.
bool QWebPluginFactory::extension ( Extension extension, const ExtensionOption * option = 0, ExtensionReturn * output = 0 ) [virtual]
This virtual function can be reimplemented in a QWebPluginFactory subclass to provide support for extensions. The option argument is provided as input to the extension; the output results can be stored in output.
The behaviour of this function is determined by extension.
You can call supportsExtension() to check if an extension is supported by the factory.
By default, no extensions are supported, and this function returns false.
Смотрите также supportsExtension() и Extension.
QList<Plugin> QWebPluginFactory::plugins () const [pure virtual]
This function is reimplemented in subclasses to return a list of supported plugins the factory can create.
Note: Currently, this function is only called when JavaScript programs access the global plugins or mimetypes objects.
void QWebPluginFactory::refreshPlugins () [virtual]
This function is called to refresh the list of supported plugins. It may be called after a new plugin has been installed in the system.
bool QWebPluginFactory::supportsExtension ( Extension extension ) const [virtual]
This virtual function returns true if the plugin factory supports extension; otherwise false is returned.
Смотрите также extension().
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) |
Торговые марки |
Qt 4.5.3 |
|