~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qwidgetaction.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/gui/kernel/qwidgetaction.cpp -->
 
5
<!-- qwidgetaction.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: QWidgetAction Class Reference</title>
 
7
  <title>Qt 4.6: QWidgetAction Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//QWidgetAction" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QWidgetAction Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">QWidgetAction Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
16
17
</h1>
17
18
<p>The QWidgetAction class extends <a href="qaction.html">QAction</a> by an interface for inserting custom widgets into action based containers, such as toolbars. <a href="#details">More...</a></p>
18
19
<pre> #include &lt;QWidgetAction&gt;</pre><p>Inherits <a href="qaction.html">QAction</a>.</p>
20
21
<ul>
21
22
<li><a href="qwidgetaction-members.html">List of all members, including inherited members</a></li>
22
23
</ul>
 
24
<hr />
23
25
<a name="public-functions"></a>
24
 
<h3>Public Functions</h3>
25
 
<ul>
26
 
<li><div class="fn"></div><b><a href="qwidgetaction.html#QWidgetAction">QWidgetAction</a></b> ( QObject * <i>parent</i> )</li>
27
 
<li><div class="fn"></div>virtual <b><a href="qwidgetaction.html#dtor.QWidgetAction">~QWidgetAction</a></b> ()</li>
28
 
<li><div class="fn"></div>QWidget * <b><a href="qwidgetaction.html#defaultWidget">defaultWidget</a></b> () const</li>
29
 
<li><div class="fn"></div>void <b><a href="qwidgetaction.html#releaseWidget">releaseWidget</a></b> ( QWidget * <i>widget</i> )</li>
30
 
<li><div class="fn"></div>QWidget * <b><a href="qwidgetaction.html#requestWidget">requestWidget</a></b> ( QWidget * <i>parent</i> )</li>
31
 
<li><div class="fn"></div>void <b><a href="qwidgetaction.html#setDefaultWidget">setDefaultWidget</a></b> ( QWidget * <i>widget</i> )</li>
32
 
</ul>
33
 
<ul>
34
 
<li><div class="fn"></div>45 public functions inherited from <a href="qaction.html#public-functions">QAction</a></li>
35
 
<li><div class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
36
 
</ul>
 
26
<h2>Public Functions</h2>
 
27
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
28
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qwidgetaction.html#QWidgetAction">QWidgetAction</a></b> ( QObject * <i>parent</i> )</td></tr>
 
29
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><b><a href="qwidgetaction.html#dtor.QWidgetAction">~QWidgetAction</a></b> ()</td></tr>
 
30
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidgetaction.html#defaultWidget">defaultWidget</a></b> () const</td></tr>
 
31
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidgetaction.html#releaseWidget">releaseWidget</a></b> ( QWidget * <i>widget</i> )</td></tr>
 
32
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidgetaction.html#requestWidget">requestWidget</a></b> ( QWidget * <i>parent</i> )</td></tr>
 
33
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidgetaction.html#setDefaultWidget">setDefaultWidget</a></b> ( QWidget * <i>widget</i> )</td></tr>
 
34
</table>
 
35
<ul>
 
36
<li><div bar="2" class="fn"></div>49 public functions inherited from <a href="qaction.html#public-functions">QAction</a></li>
 
37
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
38
</ul>
 
39
<hr />
37
40
<a name="protected-functions"></a>
38
 
<h3>Protected Functions</h3>
39
 
<ul>
40
 
<li><div class="fn"></div>virtual QWidget * <b><a href="qwidgetaction.html#createWidget">createWidget</a></b> ( QWidget * <i>parent</i> )</li>
41
 
<li><div class="fn"></div>QList&lt;QWidget *&gt; <b><a href="qwidgetaction.html#createdWidgets">createdWidgets</a></b> () const</li>
42
 
<li><div class="fn"></div>virtual void <b><a href="qwidgetaction.html#deleteWidget">deleteWidget</a></b> ( QWidget * <i>widget</i> )</li>
43
 
</ul>
44
 
<ul>
45
 
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
41
<h2>Protected Functions</h2>
 
42
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
43
<tr><td class="memItemLeft" align="right" valign="top">virtual QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidgetaction.html#createWidget">createWidget</a></b> ( QWidget * <i>parent</i> )</td></tr>
 
44
<tr><td class="memItemLeft" align="right" valign="top">QList&lt;QWidget *&gt; </td><td class="memItemRight" valign="bottom"><b><a href="qwidgetaction.html#createdWidgets">createdWidgets</a></b> () const</td></tr>
 
45
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidgetaction.html#deleteWidget">deleteWidget</a></b> ( QWidget * <i>widget</i> )</td></tr>
 
46
</table>
 
47
<hr />
 
48
<a name="reimplemented-protected-functions"></a>
 
49
<h2>Reimplemented Protected Functions</h2>
 
50
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
51
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidgetaction.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
 
52
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidgetaction.html#eventFilter">eventFilter</a></b> ( QObject * <i>obj</i>, QEvent * <i>event</i> )</td></tr>
 
53
</table>
 
54
<ul>
 
55
<li><div bar="2" class="fn"></div>1 protected function inherited from <a href="qaction.html#protected-functions">QAction</a></li>
 
56
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
46
57
</ul>
47
58
<h3>Additional Inherited Members</h3>
48
59
<ul>
49
 
<li><div class="fn"></div>16 properties inherited from <a href="qaction.html#properties">QAction</a></li>
 
60
<li><div class="fn"></div>18 properties inherited from <a href="qaction.html#properties">QAction</a></li>
50
61
<li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
51
62
<li><div class="fn"></div>7 public slots inherited from <a href="qaction.html#public-slots">QAction</a></li>
52
63
<li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
73
84
<p>See also <a href="qaction.html">QAction</a>, <a href="qactiongroup.html">QActionGroup</a>, and <a href="qwidget.html">QWidget</a>.</p>
74
85
<hr />
75
86
<h2>Member Function Documentation</h2>
 
87
<a name="//apple_ref/cpp/instm/QWidgetAction/QWidgetAction" />
76
88
<h3 class="fn"><a name="QWidgetAction"></a>QWidgetAction::QWidgetAction ( <a href="qobject.html">QObject</a> * <i>parent</i> )</h3>
77
89
<p>Constructs an action with <i>parent</i>.</p>
 
90
<a name="//apple_ref/cpp/instm/QWidgetAction/~QWidgetAction" />
78
91
<h3 class="fn"><a name="dtor.QWidgetAction"></a>QWidgetAction::~QWidgetAction ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
79
92
<p>Destroys the object and frees allocated resources.</p>
 
93
<a name="//apple_ref/cpp/instm/QWidgetAction/createWidget" />
80
94
<h3 class="fn"><a name="createWidget"></a><a href="qwidget.html">QWidget</a> * QWidgetAction::createWidget ( <a href="qwidget.html">QWidget</a> * <i>parent</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
81
95
<p>This function is called whenever the action is added to a container widget that supports custom widgets. If you don't want a custom widget to be used as representation of the action in the specified <i>parent</i> widget then 0 should be returned.</p>
82
96
<p>See also <a href="qwidgetaction.html#deleteWidget">deleteWidget</a>().</p>
 
97
<a name="//apple_ref/cpp/instm/QWidgetAction/createdWidgets" />
83
98
<h3 class="fn"><a name="createdWidgets"></a><a href="qlist.html">QList</a>&lt;<a href="qwidget.html">QWidget</a> *&gt; QWidgetAction::createdWidgets () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
84
99
<p>Returns the list of widgets that have been using <a href="qwidgetaction.html#createWidget">createWidget</a>() and are currently in use by widgets the action has been added to.</p>
 
100
<a name="//apple_ref/cpp/instm/QWidgetAction/defaultWidget" />
85
101
<h3 class="fn"><a name="defaultWidget"></a><a href="qwidget.html">QWidget</a> * QWidgetAction::defaultWidget () const</h3>
86
102
<p>Returns the default widget.</p>
87
103
<p>See also <a href="qwidgetaction.html#setDefaultWidget">setDefaultWidget</a>().</p>
 
104
<a name="//apple_ref/cpp/instm/QWidgetAction/deleteWidget" />
88
105
<h3 class="fn"><a name="deleteWidget"></a>void QWidgetAction::deleteWidget ( <a href="qwidget.html">QWidget</a> * <i>widget</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
89
106
<p>This function is called whenever the action is removed from a container widget that displays the action using a custom <i>widget</i> previously created using <a href="qwidgetaction.html#createWidget">createWidget</a>(). The default implementation hides the <i>widget</i> and schedules it for deletion using <a href="qobject.html#deleteLater">QObject::deleteLater</a>().</p>
90
107
<p>See also <a href="qwidgetaction.html#createWidget">createWidget</a>().</p>
 
108
<a name="//apple_ref/cpp/instm/QWidgetAction/event" />
 
109
<h3 class="fn"><a name="event"></a>bool QWidgetAction::event ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
110
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
 
111
<a name="//apple_ref/cpp/instm/QWidgetAction/eventFilter" />
 
112
<h3 class="fn"><a name="eventFilter"></a>bool QWidgetAction::eventFilter ( <a href="qobject.html">QObject</a> * <i>obj</i>, <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
113
<p>Reimplemented from <a href="qobject.html#eventFilter">QObject::eventFilter</a>().</p>
 
114
<a name="//apple_ref/cpp/instm/QWidgetAction/releaseWidget" />
91
115
<h3 class="fn"><a name="releaseWidget"></a>void QWidgetAction::releaseWidget ( <a href="qwidget.html">QWidget</a> * <i>widget</i> )</h3>
92
116
<p>Releases the specified <i>widget</i>.</p>
93
117
<p>Container widgets that support actions call this function when a widget action is removed.</p>
94
118
<p>See also <a href="qwidgetaction.html#requestWidget">requestWidget</a>(), <a href="qwidgetaction.html#deleteWidget">deleteWidget</a>(), and <a href="qwidgetaction.html#defaultWidget">defaultWidget</a>().</p>
 
119
<a name="//apple_ref/cpp/instm/QWidgetAction/requestWidget" />
95
120
<h3 class="fn"><a name="requestWidget"></a><a href="qwidget.html">QWidget</a> * QWidgetAction::requestWidget ( <a href="qwidget.html">QWidget</a> * <i>parent</i> )</h3>
96
121
<p>Returns a widget that represents the action, with the given <i>parent</i>.</p>
97
122
<p>Container widgets that support actions can call this function to request a widget as visual representation of the action.</p>
98
123
<p>See also <a href="qwidgetaction.html#releaseWidget">releaseWidget</a>(), <a href="qwidgetaction.html#createWidget">createWidget</a>(), and <a href="qwidgetaction.html#defaultWidget">defaultWidget</a>().</p>
 
124
<a name="//apple_ref/cpp/instm/QWidgetAction/setDefaultWidget" />
99
125
<h3 class="fn"><a name="setDefaultWidget"></a>void QWidgetAction::setDefaultWidget ( <a href="qwidget.html">QWidget</a> * <i>widget</i> )</h3>
100
126
<p>Sets <i>widget</i> to be the default widget. The ownership is transferred to <a href="qwidgetaction.html">QWidgetAction</a>. Unless <a href="qwidgetaction.html#createWidget">createWidget</a>() is reimplemented by a subclass to return a new widget the default widget is used when a container widget requests a widget through <a href="qwidgetaction.html#requestWidget">requestWidget</a>().</p>
101
127
<p>See also <a href="qwidgetaction.html#defaultWidget">defaultWidget</a>().</p>
102
128
<p /><address><hr /><div align="center">
103
129
<table width="100%" cellspacing="0" border="0"><tr class="address">
104
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
105
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
106
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
107
 
</tr></table></div></address></body>
 
130
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
131
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
132
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
133
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
108
134
</html>