~ubuntu-branches/ubuntu/precise/python-qt4/precise-proposed

« back to all changes in this revision

Viewing changes to doc/html/qextensionmanager.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Jonathan Riddell
  • Date: 2010-11-08 16:13:33 UTC
  • mfrom: (1.5.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101108161333-0nec4wu0nz3wpf9r
Tags: 4.8.1-0ubuntu1
[ Jonathan Riddell ]
* New upstream release
* Build against python-sip-dev 4.11.2
* Remove kubuntu_02_fix-scpk-and-flag-issue.diff merged upstream
* Install __init__.py into /usr/lib/python3.2/dist-packages/PyQt4,
  fixes Python 3 support
* Add QtDeclarative to python-qt4
* Add kubuntu_03_uiparser.diff from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
td.postheader { font-family: sans-serif }
7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
 
</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">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QExtensionManager Class Reference<br /><sup><sup>[<a href="qtdesigner.html">QtDesigner</a> module]</sup></sup></h1><p>The QExtensionManager class provides extension management facilities for Qt Designer. <a href="#details">More...</a></p>
10
 
<p>Inherits <a href="qobject.html">QObject</a> and <a href="qabstractextensionmanager.html">QAbstractExtensionManager</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qextensionmanager.html#QExtensionManager">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />QObject <b><a href="qextensionmanager.html#extension">extension</a></b> (<i>self</i>, QObject, QString)</li><li><div class="fn" /><b><a href="qextensionmanager.html#registerExtensions">registerExtensions</a></b> (<i>self</i>, QAbstractExtensionFactory, QString&#160;<i>iid</i>&#160;=&#160;QString())</li><li><div class="fn" /><b><a href="qextensionmanager.html#unregisterExtensions">unregisterExtensions</a></b> (<i>self</i>, QAbstractExtensionFactory, QString&#160;<i>iid</i>&#160;=&#160;QString())</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QExtensionManager class provides extension management facilities for Qt Designer.</p>
11
 
<p>In <i>Qt Designer</i> the extensions are not created until they are required. For that reason, when implementing an extension, you must also create a <a href="qextensionfactory.html">QExtensionFactory</a>, i.e a class that is able to make an instance of your extension, and register it using <i>Qt Designer</i>'s extension manager.</p>
12
 
<p>The registration of an extension factory is typically made in the <a href="qdesignercustomwidgetinterface.html#initialize">QDesignerCustomWidgetInterface.initialize</a>() function:</p>
13
 
<pre>         void MyPlugin.initialize(QDesignerFormEditorInterface *formEditor)
 
9
</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">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QExtensionManager Class Reference<br /><sup><sup>[<a href="qtdesigner.html">QtDesigner</a> module]</sup></sup></h1><p>The QExtensionManager class provides extension management
 
10
facilities for Qt Designer. <a href="#details">More...</a></p>
 
11
 
 
12
<p>Inherits <a href="qobject.html">QObject</a> and <a href="qabstractextensionmanager.html">QAbstractExtensionManager</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qextensionmanager.html#QExtensionManager">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />QObject <b><a href="qextensionmanager.html#extension">extension</a></b> (<i>self</i>, QObject, QString)</li><li><div class="fn" /><b><a href="qextensionmanager.html#registerExtensions">registerExtensions</a></b> (<i>self</i>, QAbstractExtensionFactory, QString&#160;<i>iid</i>&#160;=&#160;QString())</li><li><div class="fn" /><b><a href="qextensionmanager.html#unregisterExtensions">unregisterExtensions</a></b> (<i>self</i>, QAbstractExtensionFactory, QString&#160;<i>iid</i>&#160;=&#160;QString())</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QExtensionManager class provides extension management
 
13
facilities for Qt Designer.</p>
 
14
<p>In <i>Qt Designer</i> the extensions are not created until they
 
15
are required. For that reason, when implementing an extension, you
 
16
must also create a <a href="qextensionfactory.html">QExtensionFactory</a>, i.e a class that is
 
17
able to make an instance of your extension, and register it using
 
18
<i>Qt Designer</i>'s extension manager.</p>
 
19
<p>The registration of an extension factory is typically made in
 
20
the <a href="qdesignercustomwidgetinterface.html#initialize">QDesignerCustomWidgetInterface.initialize</a>()
 
21
function:</p>
 
22
<pre class="highlightedCode brush: cpp">
 
23
         void MyPlugin.initialize(QDesignerFormEditorInterface *formEditor)
14
24
         {
15
25
             if (initialized)
16
26
                 return;
22
32
                                         Q_TYPEID(QDesignerTaskMenuExtension));
23
33
 
24
34
             initialized = true;
25
 
         }</pre>
26
 
<p>The QExtensionManager is not intended to be instantiated directly. You can retrieve an interface to <i>Qt Designer</i>'s extension manager using the <a href="qdesignerformeditorinterface.html#extensionManager">QDesignerFormEditorInterface.extensionManager</a>() function. A pointer to <i>Qt Designer</i>'s current <a href="qdesignerformeditorinterface.html">QDesignerFormEditorInterface</a> object (<tt>formEditor</tt> in the example above) is provided by the <a href="qdesignercustomwidgetinterface.html#initialize">QDesignerCustomWidgetInterface.initialize</a>() function's parameter. When implementing a custom widget plugin, you must subclass the <a href="qdesignercustomwidgetinterface.html">QDesignerCustomWidgetInterface</a> to expose your plugin to <i>Qt Designer</i>.</p>
27
 
<p>Then, when an extension is required, <i>Qt Designer</i>'s extension manager will run through all its registered factories calling <a href="qextensionfactory.html#createExtension">QExtensionFactory.createExtension</a>() for each until the first one that is able to create the requested extension for the selected object, is found. This factory will then make an instance of the extension.</p>
28
 
<p>There are four available types of extensions in <i>Qt Designer</i>: <a href="qdesignercontainerextension.html">QDesignerContainerExtension</a> , <a href="qdesignermembersheetextension.html">QDesignerMemberSheetExtension</a>, <a href="qdesignerpropertysheetextension.html">QDesignerPropertySheetExtension</a> and <a href="qdesignertaskmenuextension.html">QDesignerTaskMenuExtension</a>. <i>Qt Designer</i>'s behavior is the same whether the requested extension is associated with a container, a member sheet, a property sheet or a task menu.</p>
29
 
<p>For a complete example using the QExtensionManager class, see the <a href="designer-taskmenuextension.html">Task Menu Extension example</a>. The example shows how to create a custom widget plugin for Qt Designer, and how to to use the <a href="qdesignertaskmenuextension.html">QDesignerTaskMenuExtension</a> class to add custom items to <i>Qt Designer</i>'s task menu.</p>
30
 
<p>See also <a href="qextensionfactory.html">QExtensionFactory</a> and <a href="qabstractextensionmanager.html">QAbstractExtensionManager</a>.</p>
31
 
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QExtensionManager" />QExtensionManager.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;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 an extension manager with the given <i>parent</i>.</p>
32
 
<a name="//apple_ref/cpp/instm/QExtensionManager/~QExtensionManager" />
 
35
         }
 
36
</pre>
 
37
<p>The QExtensionManager is not intended to be instantiated
 
38
directly. You can retrieve an interface to <i>Qt Designer</i>'s
 
39
extension manager using the <a href="qdesignerformeditorinterface.html#extensionManager">QDesignerFormEditorInterface.extensionManager</a>()
 
40
function. A pointer to <i>Qt Designer</i>'s current <a href="qdesignerformeditorinterface.html">QDesignerFormEditorInterface</a>
 
41
object (<tt>formEditor</tt> in the example above) is provided by
 
42
the <a href="qdesignercustomwidgetinterface.html#initialize">QDesignerCustomWidgetInterface.initialize</a>()
 
43
function's parameter. When implementing a custom widget plugin, you
 
44
must subclass the <a href="qdesignercustomwidgetinterface.html">QDesignerCustomWidgetInterface</a>
 
45
to expose your plugin to <i>Qt Designer</i>.</p>
 
46
<p>Then, when an extension is required, <i>Qt Designer</i>'s
 
47
extension manager will run through all its registered factories
 
48
calling <a href="qextensionfactory.html#createExtension">QExtensionFactory.createExtension</a>()
 
49
for each until the first one that is able to create the requested
 
50
extension for the selected object, is found. This factory will then
 
51
make an instance of the extension.</p>
 
52
<p>There are four available types of extensions in <i>Qt
 
53
Designer</i>: <a href="qdesignercontainerextension.html">QDesignerContainerExtension</a>
 
54
, <a href="qdesignermembersheetextension.html">QDesignerMemberSheetExtension</a>,
 
55
<a href="qdesignerpropertysheetextension.html">QDesignerPropertySheetExtension</a>
 
56
and <a href="qdesignertaskmenuextension.html">QDesignerTaskMenuExtension</a>.
 
57
<i>Qt Designer</i>'s behavior is the same whether the requested
 
58
extension is associated with a container, a member sheet, a
 
59
property sheet or a task menu.</p>
 
60
<p>For a complete example using the QExtensionManager class, see
 
61
the <a href="designer-taskmenuextension.html">Task Menu Extension
 
62
example</a>. The example shows how to create a custom widget plugin
 
63
for Qt Designer, and how to to use the <a href="qdesignertaskmenuextension.html">QDesignerTaskMenuExtension</a>
 
64
class to add custom items to <i>Qt Designer</i>'s task menu.</p>
 
65
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QExtensionManager" />QExtensionManager.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;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 an extension manager with the given
 
66
<i>parent</i>.</p>
 
67
 
 
68
 
33
69
<h3 class="fn"><a name="extension" /><a href="qobject.html">QObject</a> QExtensionManager.extension (<i>self</i>, <a href="qobject.html">QObject</a>, QString)</h3><p>Reimplemented from <a href="qabstractextensionmanager.html#extension">QAbstractExtensionManager.extension</a>().</p>
34
 
<p>Returns the extension specified by <i>iid</i>, for the given <i>object</i>.</p>
35
 
<a name="//apple_ref/cpp/instm/QExtensionManager/registerExtensions" />
 
70
<p>Returns the extension specified by <i>iid</i>, for the given
 
71
<i>object</i>.</p>
 
72
 
 
73
 
36
74
<h3 class="fn"><a name="registerExtensions" />QExtensionManager.registerExtensions (<i>self</i>, <a href="qabstractextensionfactory.html">QAbstractExtensionFactory</a>, QString&#160;<i>iid</i>&#160;=&#160;QString())</h3><p>Reimplemented from <a href="qabstractextensionmanager.html#registerExtensions">QAbstractExtensionManager.registerExtensions</a>().</p>
37
 
<p>Register the extension specified by the given <i>factory</i> and extension identifier <i>iid</i>.</p>
38
 
<a name="//apple_ref/cpp/instm/QExtensionManager/unregisterExtensions" />
 
75
<p>Register the extension specified by the given <i>factory</i> and
 
76
extension identifier <i>iid</i>.</p>
 
77
 
 
78
 
39
79
<h3 class="fn"><a name="unregisterExtensions" />QExtensionManager.unregisterExtensions (<i>self</i>, <a href="qabstractextensionfactory.html">QAbstractExtensionFactory</a>, QString&#160;<i>iid</i>&#160;=&#160;QString())</h3><p>Reimplemented from <a href="qabstractextensionmanager.html#unregisterExtensions">QAbstractExtensionManager.unregisterExtensions</a>().</p>
40
 
<p>Unregister the extension specified by the given <i>factory</i> and extension identifier <i>iid</i>.</p>
41
 
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.7 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.3</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'
 
80
<p>Unregister the extension specified by the given <i>factory</i>
 
81
and extension identifier <i>iid</i>.</p>
 
82
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.8.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.7.0</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'