[190] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/widgets/qwidgetplugin.cpp:48 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>QWidgetPlugin Class</title>
|
---|
| 7 | <style type="text/css"><!--
|
---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
---|
| 11 | body { background: #ffffff; color: black; }
|
---|
| 12 | --></style>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 |
|
---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
| 17 | <tr bgcolor="#E5E5E5">
|
---|
| 18 | <td valign=center>
|
---|
| 19 | <a href="index.html">
|
---|
| 20 | <font color="#004faf">Home</font></a>
|
---|
| 21 | | <a href="classes.html">
|
---|
| 22 | <font color="#004faf">All Classes</font></a>
|
---|
| 23 | | <a href="mainclasses.html">
|
---|
| 24 | <font color="#004faf">Main Classes</font></a>
|
---|
| 25 | | <a href="annotated.html">
|
---|
| 26 | <font color="#004faf">Annotated</font></a>
|
---|
| 27 | | <a href="groups.html">
|
---|
| 28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
| 29 | | <a href="functions.html">
|
---|
| 30 | <font color="#004faf">Functions</font></a>
|
---|
| 31 | </td>
|
---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QWidgetPlugin Class Reference</h1>
|
---|
| 33 |
|
---|
| 34 | <p>The QWidgetPlugin class provides an abstract base for custom QWidget plugins.
|
---|
| 35 | <a href="#details">More...</a>
|
---|
| 36 | <p><tt>#include <<a href="qwidgetplugin-h.html">qwidgetplugin.h</a>></tt>
|
---|
| 37 | <p><a href="qwidgetplugin-members.html">List of all member functions.</a>
|
---|
| 38 | <h2>Public Members</h2>
|
---|
| 39 | <ul>
|
---|
| 40 | <li class=fn><a href="#QWidgetPlugin"><b>QWidgetPlugin</b></a> ()</li>
|
---|
| 41 | <li class=fn><a href="#~QWidgetPlugin"><b>~QWidgetPlugin</b></a> ()</li>
|
---|
| 42 | <li class=fn>virtual QStringList <a href="#keys"><b>keys</b></a> () const = 0</li>
|
---|
| 43 | <li class=fn>virtual QWidget * <a href="#create"><b>create</b></a> ( const QString & key, QWidget * parent = 0, const char * name = 0 ) = 0</li>
|
---|
| 44 | <li class=fn>virtual QString <a href="#group"><b>group</b></a> ( const QString & key ) const</li>
|
---|
| 45 | <li class=fn>virtual QIconSet <a href="#iconSet"><b>iconSet</b></a> ( const QString & key ) const</li>
|
---|
| 46 | <li class=fn>virtual QString <a href="#includeFile"><b>includeFile</b></a> ( const QString & key ) const</li>
|
---|
| 47 | <li class=fn>virtual QString <a href="#toolTip"><b>toolTip</b></a> ( const QString & key ) const</li>
|
---|
| 48 | <li class=fn>virtual QString <a href="#whatsThis"><b>whatsThis</b></a> ( const QString & key ) const</li>
|
---|
| 49 | <li class=fn>virtual bool <a href="#isContainer"><b>isContainer</b></a> ( const QString & key ) const</li>
|
---|
| 50 | </ul>
|
---|
| 51 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 | The QWidgetPlugin class provides an abstract base for custom <a href="qwidget.html">QWidget</a> plugins.
|
---|
| 55 | <p>
|
---|
| 56 | <p> The widget plugin is a simple plugin interface that makes it easy
|
---|
| 57 | to create custom widgets that can be included in forms using <a href="designer-manual.html">Qt Designer</a> and used by applications.
|
---|
| 58 | <p> Writing a widget plugin is achieved by subclassing this base
|
---|
| 59 | class, reimplementing the pure virtual functions <a href="#keys">keys</a>(), <a href="#create">create</a>(),
|
---|
| 60 | <a href="#group">group</a>(), <a href="#iconSet">iconSet</a>(), <a href="#includeFile">includeFile</a>(), <a href="#toolTip">toolTip</a>(), <a href="#whatsThis">whatsThis</a>() and
|
---|
| 61 | <a href="#isContainer">isContainer</a>(), and exporting the class with the <tt>Q_EXPORT_PLUGIN</tt>
|
---|
| 62 | macro.
|
---|
| 63 | <p> See the <a href="designer-manual.html">Qt Designer manual's</a>,
|
---|
| 64 | 'Creating Custom Widgets' section in the 'Creating Custom Widgets'
|
---|
| 65 | chapter, for a complete example of a QWidgetPlugin.
|
---|
| 66 | <p> See also the <a href="plugins-howto.html">Plugins
|
---|
| 67 | documentation</a> and the <a href="qwidgetfactory.html">QWidgetFactory</a> class that is
|
---|
| 68 | supplied with <a href="designer-manual.html">Qt Designer</a>.
|
---|
| 69 | <p>See also <a href="plugins.html">Plugins</a>.
|
---|
| 70 |
|
---|
| 71 | <hr><h2>Member Function Documentation</h2>
|
---|
| 72 | <h3 class=fn><a name="QWidgetPlugin"></a>QWidgetPlugin::QWidgetPlugin ()
|
---|
| 73 | </h3>
|
---|
| 74 | Constructs a widget plugin. This is invoked automatically by the
|
---|
| 75 | <tt>Q_EXPORT_PLUGIN</tt> macro.
|
---|
| 76 |
|
---|
| 77 | <h3 class=fn><a name="~QWidgetPlugin"></a>QWidgetPlugin::~QWidgetPlugin ()
|
---|
| 78 | </h3>
|
---|
| 79 | Destroys the widget plugin.
|
---|
| 80 | <p> You never have to call this explicitly. Qt destroys a plugin
|
---|
| 81 | automatically when it is no longer used.
|
---|
| 82 |
|
---|
| 83 | <h3 class=fn><a href="qwidget.html">QWidget</a> * <a name="create"></a>QWidgetPlugin::create ( const <a href="qstring.html">QString</a> & key, <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0 )<tt> [pure virtual]</tt>
|
---|
| 84 | </h3>
|
---|
| 85 |
|
---|
| 86 | <p> Creates and returns a <a href="qwidget.html">QWidget</a> object for the widget key <em>key</em>.
|
---|
| 87 | The widget key is the class name of the required widget. The <em>name</em> and <em>parent</em> arguments are passed to the custom widget's
|
---|
| 88 | constructor.
|
---|
| 89 | <p> <p>See also <a href="#keys">keys</a>().
|
---|
| 90 |
|
---|
| 91 | <h3 class=fn><a href="qstring.html">QString</a> <a name="group"></a>QWidgetPlugin::group ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
| 92 | </h3>
|
---|
| 93 | Returns the group (toolbar name) that the custom widget of class
|
---|
| 94 | <em>key</em> should be part of when <em>Qt Designer</em> loads it.
|
---|
| 95 | <p> The default implementation returns <a href="qstring.html#QString-null">QString::null</a>.
|
---|
| 96 |
|
---|
| 97 | <h3 class=fn><a href="qiconset.html">QIconSet</a> <a name="iconSet"></a>QWidgetPlugin::iconSet ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
| 98 | </h3>
|
---|
| 99 | Returns the iconset that <em>Qt Designer</em> should use to represent
|
---|
| 100 | the custom widget of class <em>key</em> in the toolbar.
|
---|
| 101 | <p> The default implementation returns an null iconset.
|
---|
| 102 |
|
---|
| 103 | <h3 class=fn><a href="qstring.html">QString</a> <a name="includeFile"></a>QWidgetPlugin::includeFile ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
| 104 | </h3>
|
---|
| 105 | Returns the name of the include file that <em>Qt Designer</em> and <tt>uic</tt> should use to include the custom widget of class <em>key</em> in
|
---|
| 106 | generated code.
|
---|
| 107 | <p> The default implementation returns <a href="qstring.html#QString-null">QString::null</a>.
|
---|
| 108 |
|
---|
| 109 | <h3 class=fn>bool <a name="isContainer"></a>QWidgetPlugin::isContainer ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
| 110 | </h3>
|
---|
| 111 | Returns TRUE if the custom widget of class <em>key</em> can contain
|
---|
| 112 | other widgets, e.g. like <a href="qframe.html">QFrame</a>; otherwise returns FALSE.
|
---|
| 113 | <p> The default implementation returns FALSE.
|
---|
| 114 |
|
---|
| 115 | <h3 class=fn><a href="qstringlist.html">QStringList</a> <a name="keys"></a>QWidgetPlugin::keys () const<tt> [pure virtual]</tt>
|
---|
| 116 | </h3>
|
---|
| 117 |
|
---|
| 118 | <p> Returns the list of widget keys this plugin supports.
|
---|
| 119 | <p> These keys must be the class names of the custom widgets that are
|
---|
| 120 | implemented in the plugin.
|
---|
| 121 | <p> <p>See also <a href="#create">create</a>().
|
---|
| 122 |
|
---|
| 123 | <h3 class=fn><a href="qstring.html">QString</a> <a name="toolTip"></a>QWidgetPlugin::toolTip ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
| 124 | </h3>
|
---|
| 125 | Returns the text of the tooltip that <em>Qt Designer</em> should use
|
---|
| 126 | for the custom widget of class <em>key</em>'s toolbar button.
|
---|
| 127 | <p> The default implementation returns <a href="qstring.html#QString-null">QString::null</a>.
|
---|
| 128 |
|
---|
| 129 | <h3 class=fn><a href="qstring.html">QString</a> <a name="whatsThis"></a>QWidgetPlugin::whatsThis ( const <a href="qstring.html">QString</a> & key ) const<tt> [virtual]</tt>
|
---|
| 130 | </h3>
|
---|
| 131 | Returns the text of the whatsThis text that <em>Qt Designer</em> should
|
---|
| 132 | use when the user requests whatsThis help for the custom widget of
|
---|
| 133 | class <em>key</em>.
|
---|
| 134 | <p> The default implementation returns <a href="qstring.html#QString-null">QString::null</a>.
|
---|
| 135 |
|
---|
| 136 | <!-- eof -->
|
---|
| 137 | <hr><p>
|
---|
| 138 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
| 139 | Copyright © 1995-2007
|
---|
| 140 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
| 141 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 142 | <td>Copyright © 2007
|
---|
| 143 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 144 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 145 | </table></div></address></body>
|
---|
| 146 | </html>
|
---|