1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QWebPluginFactory Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QWebPluginFactory Class Reference<br /><sup><sup>[<a href="qtwebkit.html">QtWebKit</a> module]</sup></sup></h1><p>The QWebPluginFactory class creates plugins to be embedded into web pages. <a href="#details">More...</a></p>
<p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qwebpluginfactory.html#Extension-enum">Extension</a></b> { }</li><li><div class="fn" />class <b><a href="qwebpluginfactory-extensionoption.html">ExtensionOption</a></b></li><li><div class="fn" />class <b><a href="qwebpluginfactory-extensionreturn.html">ExtensionReturn</a></b></li><li><div class="fn" />class <b><a href="qwebpluginfactory-mimetype.html">MimeType</a></b></li><li><div class="fn" />class <b><a href="qwebpluginfactory-plugin.html">Plugin</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qwebpluginfactory.html#QWebPluginFactory">__init__</a></b> (<i>self</i>, QObject <i>parent</i> = None)</li><li><div class="fn" />QObject <b><a href="qwebpluginfactory.html#create">create</a></b> (<i>self</i>, QString, QUrl, QStringList, QStringList)</li><li><div class="fn" />bool <b><a href="qwebpluginfactory.html#extension">extension</a></b> (<i>self</i>, Extension, ExtensionOption <i>option</i> = None, ExtensionReturn <i>output</i> = None)</li><li><div class="fn" />list-of-QWebPluginFactory.Plugin <b><a href="qwebpluginfactory.html#plugins">plugins</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebpluginfactory.html#refreshPlugins">refreshPlugins</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qwebpluginfactory.html#supportsExtension">supportsExtension</a></b> (<i>self</i>, Extension)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QWebPluginFactory class creates plugins to be embedded into web pages.</p>
<p>QWebPluginFactory is a factory for creating plugins for <a href="qwebpage.html">QWebPage</a>. A plugin factory can be installed on a <a href="qwebpage.html">QWebPage</a> using <a href="qwebpage.html#setPluginFactory">QWebPage.setPluginFactory</a>().</p>
<p><b>Note:</b> The plugin factory is only used if plugins are enabled through <a href="qwebsettings.html">QWebSettings</a>.</p>
<p>You can provide a QWebPluginFactory by implementing the <a href="qwebpluginfactory.html#plugins">plugins</a>() and the <a href="qwebpluginfactory.html#create">create</a>() method. For <a href="qwebpluginfactory.html#plugins">plugins</a>() 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 <tt><object></tt> tag.</p>
<p>The <a href="qwebpluginfactory.html#create">create</a>() 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.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Extension-enum" />QWebPluginFactory.Extension</h3><p>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 <a href="qwebpluginfactory.html#supportsExtension">supportsExtension</a>().</p>
<p>Currently there are no extensions.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QWebPluginFactory" />QWebPluginFactory.__init__ (<i>self</i>, <a href="qobject.html">QObject</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qwebpluginfactory.html">QWebPluginFactory</a> with parent <i>parent</i>.</p>
<a name="//apple_ref/cpp/instm/QWebPluginFactory/~QWebPluginFactory" />
<h3 class="fn"><a name="create" /><a href="qobject.html">QObject</a> QWebPluginFactory.create (<i>self</i>, QString, <a href="qurl.html">QUrl</a>, QStringList, QStringList)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Implemented in subclasses to create a new plugin that can display content of the MIME type given by <i>mimeType</i>. The URL of the content is provided in <i>url</i>. The returned object should be a <a href="qwidget.html">QWidget</a>.</p>
<p>The HTML object element can provide parameters through the <tt><param></tt> tag. The name and the value attributes of these tags are specified by the <i>argumentNames</i> and <i>argumentValues</i> string lists.</p>
<p>For example:</p>
<pre> <object type="application/x-pdf" data="http:<span class="comment">//qt.nokia.com/document.pdf" width="500" height="400"></span>
<param name="showTableOfContents" value="true" />
<param name="hideThumbnails" value="false" />
</object></pre>
<p>The above object element will result in a call to create() with the following arguments:</p>
<p><table align="center" border="0" cellpadding="2" cellspacing="1" class="generic">
<thead><tr class="qt-style" valign="top"><th>Parameter</th><th>Value</th></tr></thead>
<tr class="odd" valign="top"><td>mimeType</td><td>"application/x-pdf"</td></tr>
<tr class="even" valign="top"><td>url</td><td>"http://qt.nokia.com/document.pdf"</td></tr>
<tr class="odd" valign="top"><td>argumentNames</td><td>"showTableOfContents" "hideThumbnails"</td></tr>
<tr class="even" valign="top"><td>argumentVaues</td><td>"true" "false"</td></tr>
</table></p>
<p><b>Note:</b> Ownership of the returned object will be transferred to the caller.</p>
<a name="//apple_ref/cpp/instm/QWebPluginFactory/extension" />
<h3 class="fn"><a name="extension" />bool QWebPluginFactory.extension (<i>self</i>, <a href="qwebpluginfactory.html#Extension-enum">Extension</a>, <a href="qwebpluginfactory-extensionoption.html">ExtensionOption</a> <i>option</i> = None, <a href="qwebpluginfactory-extensionreturn.html">ExtensionReturn</a> <i>output</i> = None)</h3><p>This virtual function can be reimplemented in a <a href="qwebpluginfactory.html">QWebPluginFactory</a> subclass to provide support for extensions. The <i>option</i> argument is provided as input to the extension; the output results can be stored in <i>output</i>.</p>
<p>The behaviour of this function is determined by <i>extension</i>.</p>
<p>You can call <a href="qwebpluginfactory.html#supportsExtension">supportsExtension</a>() to check if an extension is supported by the factory.</p>
<p>By default, no extensions are supported, and this function returns false.</p>
<p>See also <a href="qwebpluginfactory.html#supportsExtension">supportsExtension</a>() and <a href="qwebpluginfactory.html#Extension-enum">Extension</a>.</p>
<a name="//apple_ref/cpp/instm/QWebPluginFactory/plugins" />
<h3 class="fn"><a name="plugins" />list-of-QWebPluginFactory.Plugin QWebPluginFactory.plugins (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This function is reimplemented in subclasses to return a list of supported plugins the factory can create.</p>
<p><b>Note:</b> Currently, this function is only called when JavaScript programs access the global <tt>plugins</tt> or <tt>mimetypes</tt> objects.</p>
<a name="//apple_ref/cpp/instm/QWebPluginFactory/refreshPlugins" />
<h3 class="fn"><a name="refreshPlugins" />QWebPluginFactory.refreshPlugins (<i>self</i>)</h3><p>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.</p>
<a name="//apple_ref/cpp/instm/QWebPluginFactory/supportsExtension" />
<h3 class="fn"><a name="supportsExtension" />bool QWebPluginFactory.supportsExtension (<i>self</i>, <a href="qwebpluginfactory.html#Extension-enum">Extension</a>)</h3><p>This virtual function returns true if the plugin factory supports <i>extension</i>; otherwise false is returned.</p>
<p>See also <a href="qwebpluginfactory.html#extension">extension</a>().</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.7.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.6.2</td></tr></table></div></address></body></html>
|