File: qundogroup.html

package info (click to toggle)
qt4-x11 4%3A4.8.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 701,696 kB
  • sloc: cpp: 2,686,179; ansic: 375,485; python: 25,859; sh: 19,349; xml: 17,091; perl: 14,765; yacc: 5,383; asm: 5,038; makefile: 1,259; lex: 555; ruby: 526; objc: 347; cs: 112; pascal: 112; php: 54; sed: 34
file content (271 lines) | stat: -rw-r--r-- 26,879 bytes parent folder | download
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qundogroup.cpp -->
  <title>Qt 4.8: QUndoGroup Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QUndoGroup</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QUndoGroup Class Reference</h1>
<!-- $$$QUndoGroup-brief -->
<p>The QUndoGroup class is a group of <a href="qundostack.html">QUndoStack</a> objects. <a href="#details">More...</a></p>
<!-- @@@QUndoGroup -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QUndoGroup&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qundogroup-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#QUndoGroup">QUndoGroup</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#dtor.QUndoGroup">~QUndoGroup</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUndoStack * </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#activeStack">activeStack</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#addStack">addStack</a></b> ( QUndoStack * <i>stack</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#canRedo">canRedo</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#canUndo">canUndo</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction * </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#createRedoAction">createRedoAction</a></b> ( QObject * <i>parent</i>, const QString &amp; <i>prefix</i> = QString() ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction * </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#createUndoAction">createUndoAction</a></b> ( QObject * <i>parent</i>, const QString &amp; <i>prefix</i> = QString() ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#isClean">isClean</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#redoText">redoText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#removeStack">removeStack</a></b> ( QUndoStack * <i>stack</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QUndoStack *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#stacks">stacks</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#undoText">undoText</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#redo">redo</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#setActiveStack">setActiveStack</a></b> ( QUndoStack * <i>stack</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#undo">undo</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#activeStackChanged">activeStackChanged</a></b> ( QUndoStack * <i>stack</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#canRedoChanged">canRedoChanged</a></b> ( bool <i>canRedo</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#canUndoChanged">canUndoChanged</a></b> ( bool <i>canUndo</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#cleanChanged">cleanChanged</a></b> ( bool <i>clean</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#indexChanged">indexChanged</a></b> ( int <i>idx</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#redoTextChanged">redoTextChanged</a></b> ( const QString &amp; <i>redoText</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#undoTextChanged">undoTextChanged</a></b> ( const QString &amp; <i>undoText</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QUndoGroup-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QUndoGroup class is a group of <a href="qundostack.html">QUndoStack</a> objects.</p>
<p>For an overview of the Qt's undo framework, see the <a href="qundo.html">overview</a>.</p>
<p>An application often has multiple undo stacks, one for each opened document. At the same time, an application usually has one undo action and one redo action, which triggers undo or redo in the active document.</p>
<p>QUndoGroup is a group of <a href="qundostack.html">QUndoStack</a> objects, one of which may be active. It has an <a href="qundogroup.html#undo">undo</a>() and <a href="qundogroup.html#redo">redo</a>() slot, which calls <a href="qundostack.html#undo">QUndoStack::undo</a>() and <a href="qundostack.html#redo">QUndoStack::redo</a>() for the active stack. It also has the functions <a href="qundogroup.html#createUndoAction">createUndoAction</a>() and <a href="qundogroup.html#createRedoAction">createRedoAction</a>(). The actions returned by these functions behave in the same way as those returned by <a href="qundostack.html#createUndoAction">QUndoStack::createUndoAction</a>() and <a href="qundostack.html#createRedoAction">QUndoStack::createRedoAction</a>() of the active stack.</p>
<p>Stacks are added to a group with <a href="qundogroup.html#addStack">addStack</a>() and removed with <a href="qundogroup.html#removeStack">removeStack</a>(). A stack is implicitly added to a group when it is created with the group as its parent <a href="qobject.html">QObject</a>.</p>
<p>It is the programmer's responsibility to specify which stack is active by calling <a href="qundostack.html#active-prop">QUndoStack::setActive</a>(), usually when the associated document window receives focus. The active stack may also be set with <a href="qundogroup.html#setActiveStack">setActiveStack</a>(), and is returned by <a href="qundogroup.html#activeStack">activeStack</a>().</p>
<p>When a stack is added to a group using <a href="qundogroup.html#addStack">addStack</a>(), the group does not take ownership of the stack. This means the stack has to be deleted separately from the group. When a stack is deleted, it is automatically removed from a group. A stack may belong to only one group. Adding it to another group will cause it to be removed from the previous group.</p>
<p>A QUndoGroup is also useful in conjunction with <a href="qundoview.html">QUndoView</a>. If a <a href="qundoview.html">QUndoView</a> is set to watch a group using <a href="qundoview.html#setGroup">QUndoView::setGroup</a>(), it will update itself to display the active stack.</p>
</div>
<!-- @@@QUndoGroup -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QUndoGroup[overload1]$$$QUndoGroupQObject* -->
<h3 class="fn"><a name="QUndoGroup"></a>QUndoGroup::<span class="name">QUndoGroup</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Creates an empty <a href="qundogroup.html">QUndoGroup</a> object with parent <i>parent</i>.</p>
<p><b>See also </b><a href="qundogroup.html#addStack">addStack</a>().</p>
<!-- @@@QUndoGroup -->
<!-- $$$~QUndoGroup[overload1]$$$~QUndoGroup -->
<h3 class="fn"><a name="dtor.QUndoGroup"></a>QUndoGroup::<span class="name">~QUndoGroup</span> ()</h3>
<p>Destroys the <a href="qundogroup.html">QUndoGroup</a>.</p>
<!-- @@@~QUndoGroup -->
<!-- $$$activeStack[overload1]$$$activeStack -->
<h3 class="fn"><a name="activeStack"></a><span class="type"><a href="qundostack.html">QUndoStack</a></span> * QUndoGroup::<span class="name">activeStack</span> () const</h3>
<p>Returns the active stack of this group.</p>
<p>If none of the stacks are active, or if the group is empty, this function returns 0.</p>
<p><b>See also </b><a href="qundogroup.html#setActiveStack">setActiveStack</a>() and <a href="qundostack.html#active-prop">QUndoStack::setActive</a>().</p>
<!-- @@@activeStack -->
<!-- $$$activeStackChanged[overload1]$$$activeStackChangedQUndoStack* -->
<h3 class="fn"><a name="activeStackChanged"></a><span class="type">void</span> QUndoGroup::<span class="name">activeStackChanged</span> ( <span class="type"><a href="qundostack.html">QUndoStack</a></span> * <i>stack</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the active stack of the group changes. This can happen when <a href="qundogroup.html#setActiveStack">setActiveStack</a>() or <a href="qundostack.html#active-prop">QUndoStack::setActive</a>() is called, or when the active stack is removed form the group. <i>stack</i> is the new active stack. If no stack is active, <i>stack</i> is 0.</p>
<p><b>See also </b><a href="qundogroup.html#setActiveStack">setActiveStack</a>() and <a href="qundostack.html#active-prop">QUndoStack::setActive</a>().</p>
<!-- @@@activeStackChanged -->
<!-- $$$addStack[overload1]$$$addStackQUndoStack* -->
<h3 class="fn"><a name="addStack"></a><span class="type">void</span> QUndoGroup::<span class="name">addStack</span> ( <span class="type"><a href="qundostack.html">QUndoStack</a></span> * <i>stack</i> )</h3>
<p>Adds <i>stack</i> to this group. The group does not take ownership of the stack. Another way of adding a stack to a group is by specifying the group as the stack's parent <a href="qobject.html">QObject</a> in <a href="qundostack.html#QUndoStack">QUndoStack::QUndoStack</a>(). In this case, the stack is deleted when the group is deleted, in the usual manner of <a href="qtwebkit-bridge.html#qobjects">QObjects</a>.</p>
<p><b>See also </b><a href="qundogroup.html#removeStack">removeStack</a>(), <a href="qundogroup.html#stacks">stacks</a>(), and <a href="qundostack.html#QUndoStack">QUndoStack::QUndoStack</a>().</p>
<!-- @@@addStack -->
<!-- $$$canRedo[overload1]$$$canRedo -->
<h3 class="fn"><a name="canRedo"></a><span class="type">bool</span> QUndoGroup::<span class="name">canRedo</span> () const</h3>
<p>Returns the value of the active stack's <a href="qundostack.html#canRedo">QUndoStack::canRedo</a>().</p>
<p>If none of the stacks are active, or if the group is empty, this function returns false.</p>
<p><b>See also </b><a href="qundogroup.html#canUndo">canUndo</a>() and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@canRedo -->
<!-- $$$canRedoChanged[overload1]$$$canRedoChangedbool -->
<h3 class="fn"><a name="canRedoChanged"></a><span class="type">void</span> QUndoGroup::<span class="name">canRedoChanged</span> ( <span class="type">bool</span> <i>canRedo</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the active stack emits <a href="qundostack.html#canRedoChanged">QUndoStack::canRedoChanged</a>() or the active stack changes.</p>
<p><i>canRedo</i> is the new state, or false if the active stack is 0.</p>
<p><b>See also </b><a href="qundostack.html#canRedoChanged">QUndoStack::canRedoChanged</a>() and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@canRedoChanged -->
<!-- $$$canUndo[overload1]$$$canUndo -->
<h3 class="fn"><a name="canUndo"></a><span class="type">bool</span> QUndoGroup::<span class="name">canUndo</span> () const</h3>
<p>Returns the value of the active stack's <a href="qundostack.html#canUndo">QUndoStack::canUndo</a>().</p>
<p>If none of the stacks are active, or if the group is empty, this function returns false.</p>
<p><b>See also </b><a href="qundogroup.html#canRedo">canRedo</a>() and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@canUndo -->
<!-- $$$canUndoChanged[overload1]$$$canUndoChangedbool -->
<h3 class="fn"><a name="canUndoChanged"></a><span class="type">void</span> QUndoGroup::<span class="name">canUndoChanged</span> ( <span class="type">bool</span> <i>canUndo</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the active stack emits <a href="qundostack.html#canUndoChanged">QUndoStack::canUndoChanged</a>() or the active stack changes.</p>
<p><i>canUndo</i> is the new state, or false if the active stack is 0.</p>
<p><b>See also </b><a href="qundostack.html#canUndoChanged">QUndoStack::canUndoChanged</a>() and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@canUndoChanged -->
<!-- $$$cleanChanged[overload1]$$$cleanChangedbool -->
<h3 class="fn"><a name="cleanChanged"></a><span class="type">void</span> QUndoGroup::<span class="name">cleanChanged</span> ( <span class="type">bool</span> <i>clean</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the active stack emits <a href="qundostack.html#cleanChanged">QUndoStack::cleanChanged</a>() or the active stack changes.</p>
<p><i>clean</i> is the new state, or true if the active stack is 0.</p>
<p><b>See also </b><a href="qundostack.html#cleanChanged">QUndoStack::cleanChanged</a>() and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@cleanChanged -->
<!-- $$$createRedoAction[overload1]$$$createRedoActionQObject*constQString& -->
<h3 class="fn"><a name="createRedoAction"></a><span class="type"><a href="qaction.html">QAction</a></span> * QUndoGroup::<span class="name">createRedoAction</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>prefix</i> = QString() ) const</h3>
<p>Creates an redo <a href="qaction.html">QAction</a> object with parent <i>parent</i>.</p>
<p>Triggering this action will cause a call to <a href="qundostack.html#redo">QUndoStack::redo</a>() on the active stack. The text of this action will always be the text of the command which will be redone in the next call to <a href="qundogroup.html#redo">redo</a>(), prefixed by <i>prefix</i>. If there is no command available for redo, if the group is empty or if none of the stacks are active, this action will be disabled.</p>
<p>If <i>prefix</i> is empty, the default template &quot;Redo %1&quot; is used instead of prefix. Before Qt 4.8, the prefix &quot;Redo&quot; was used by default.</p>
<p><b>See also </b><a href="qundogroup.html#createUndoAction">createUndoAction</a>(), <a href="qundogroup.html#canRedo">canRedo</a>(), and <a href="qundocommand.html#text">QUndoCommand::text</a>().</p>
<!-- @@@createRedoAction -->
<!-- $$$createUndoAction[overload1]$$$createUndoActionQObject*constQString& -->
<h3 class="fn"><a name="createUndoAction"></a><span class="type"><a href="qaction.html">QAction</a></span> * QUndoGroup::<span class="name">createUndoAction</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>prefix</i> = QString() ) const</h3>
<p>Creates an undo <a href="qaction.html">QAction</a> object with parent <i>parent</i>.</p>
<p>Triggering this action will cause a call to <a href="qundostack.html#undo">QUndoStack::undo</a>() on the active stack. The text of this action will always be the text of the command which will be undone in the next call to <a href="qundogroup.html#undo">undo</a>(), prefixed by <i>prefix</i>. If there is no command available for undo, if the group is empty or if none of the stacks are active, this action will be disabled.</p>
<p>If <i>prefix</i> is empty, the default template &quot;Undo %1&quot; is used instead of prefix. Before Qt 4.8, the prefix &quot;Undo&quot; was used by default.</p>
<p><b>See also </b><a href="qundogroup.html#createRedoAction">createRedoAction</a>(), <a href="qundogroup.html#canUndo">canUndo</a>(), and <a href="qundocommand.html#text">QUndoCommand::text</a>().</p>
<!-- @@@createUndoAction -->
<!-- $$$indexChanged[overload1]$$$indexChangedint -->
<h3 class="fn"><a name="indexChanged"></a><span class="type">void</span> QUndoGroup::<span class="name">indexChanged</span> ( <span class="type">int</span> <i>idx</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the active stack emits <a href="qundostack.html#indexChanged">QUndoStack::indexChanged</a>() or the active stack changes.</p>
<p><i>idx</i> is the new current index, or 0 if the active stack is 0.</p>
<p><b>See also </b><a href="qundostack.html#indexChanged">QUndoStack::indexChanged</a>() and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@indexChanged -->
<!-- $$$isClean[overload1]$$$isClean -->
<h3 class="fn"><a name="isClean"></a><span class="type">bool</span> QUndoGroup::<span class="name">isClean</span> () const</h3>
<p>Returns the value of the active stack's <a href="qundostack.html#isClean">QUndoStack::isClean</a>().</p>
<p>If none of the stacks are active, or if the group is empty, this function returns true.</p>
<p><b>See also </b><a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@isClean -->
<!-- $$$redo[overload1]$$$redo -->
<h3 class="fn"><a name="redo"></a><span class="type">void</span> QUndoGroup::<span class="name">redo</span> ()<tt> [slot]</tt></h3>
<p>Calls <a href="qundostack.html#redo">QUndoStack::redo</a>() on the active stack.</p>
<p>If none of the stacks are active, or if the group is empty, this function does nothing.</p>
<p><b>See also </b><a href="qundogroup.html#undo">undo</a>(), <a href="qundogroup.html#canRedo">canRedo</a>(), and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@redo -->
<!-- $$$redoText[overload1]$$$redoText -->
<h3 class="fn"><a name="redoText"></a><span class="type"><a href="qstring.html">QString</a></span> QUndoGroup::<span class="name">redoText</span> () const</h3>
<p>Returns the value of the active stack's <a href="qundostack.html#redoText">QUndoStack::redoText</a>().</p>
<p>If none of the stacks are active, or if the group is empty, this function returns an empty string.</p>
<p><b>See also </b><a href="qundogroup.html#undoText">undoText</a>() and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@redoText -->
<!-- $$$redoTextChanged[overload1]$$$redoTextChangedconstQString& -->
<h3 class="fn"><a name="redoTextChanged"></a><span class="type">void</span> QUndoGroup::<span class="name">redoTextChanged</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>redoText</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the active stack emits <a href="qundostack.html#redoTextChanged">QUndoStack::redoTextChanged</a>() or the active stack changes.</p>
<p><i>redoText</i> is the new state, or an empty string if the active stack is 0.</p>
<p><b>See also </b><a href="qundostack.html#redoTextChanged">QUndoStack::redoTextChanged</a>() and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@redoTextChanged -->
<!-- $$$removeStack[overload1]$$$removeStackQUndoStack* -->
<h3 class="fn"><a name="removeStack"></a><span class="type">void</span> QUndoGroup::<span class="name">removeStack</span> ( <span class="type"><a href="qundostack.html">QUndoStack</a></span> * <i>stack</i> )</h3>
<p>Removes <i>stack</i> from this group. If the stack was the active stack in the group, the active stack becomes 0.</p>
<p><b>See also </b><a href="qundogroup.html#addStack">addStack</a>(), <a href="qundogroup.html#stacks">stacks</a>(), and <a href="qundostack.html#dtor.QUndoStack">QUndoStack::~QUndoStack</a>().</p>
<!-- @@@removeStack -->
<!-- $$$setActiveStack[overload1]$$$setActiveStackQUndoStack* -->
<h3 class="fn"><a name="setActiveStack"></a><span class="type">void</span> QUndoGroup::<span class="name">setActiveStack</span> ( <span class="type"><a href="qundostack.html">QUndoStack</a></span> * <i>stack</i> )<tt> [slot]</tt></h3>
<p>Sets the active stack of this group to <i>stack</i>.</p>
<p>If the stack is not a member of this group, this function does nothing.</p>
<p>Synonymous with calling <a href="qundostack.html#active-prop">QUndoStack::setActive</a>() on <i>stack</i>.</p>
<p>The actions returned by <a href="qundogroup.html#createUndoAction">createUndoAction</a>() and <a href="qundogroup.html#createRedoAction">createRedoAction</a>() will now behave in the same way as those returned by <i>stack</i>'s <a href="qundostack.html#createUndoAction">QUndoStack::createUndoAction</a>() and <a href="qundostack.html#createRedoAction">QUndoStack::createRedoAction</a>().</p>
<p><b>See also </b><a href="qundostack.html#active-prop">QUndoStack::setActive</a>() and <a href="qundogroup.html#activeStack">activeStack</a>().</p>
<!-- @@@setActiveStack -->
<!-- $$$stacks[overload1]$$$stacks -->
<h3 class="fn"><a name="stacks"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qundostack.html">QUndoStack</a></span> *&gt; QUndoGroup::<span class="name">stacks</span> () const</h3>
<p>Returns a list of stacks in this group.</p>
<p><b>See also </b><a href="qundogroup.html#addStack">addStack</a>() and <a href="qundogroup.html#removeStack">removeStack</a>().</p>
<!-- @@@stacks -->
<!-- $$$undo[overload1]$$$undo -->
<h3 class="fn"><a name="undo"></a><span class="type">void</span> QUndoGroup::<span class="name">undo</span> ()<tt> [slot]</tt></h3>
<p>Calls <a href="qundostack.html#undo">QUndoStack::undo</a>() on the active stack.</p>
<p>If none of the stacks are active, or if the group is empty, this function does nothing.</p>
<p><b>See also </b><a href="qundogroup.html#redo">redo</a>(), <a href="qundogroup.html#canUndo">canUndo</a>(), and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@undo -->
<!-- $$$undoText[overload1]$$$undoText -->
<h3 class="fn"><a name="undoText"></a><span class="type"><a href="qstring.html">QString</a></span> QUndoGroup::<span class="name">undoText</span> () const</h3>
<p>Returns the value of the active stack's <a href="qundostack.html#undoText">QUndoStack::undoText</a>().</p>
<p>If none of the stacks are active, or if the group is empty, this function returns an empty string.</p>
<p><b>See also </b><a href="qundogroup.html#redoText">redoText</a>() and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@undoText -->
<!-- $$$undoTextChanged[overload1]$$$undoTextChangedconstQString& -->
<h3 class="fn"><a name="undoTextChanged"></a><span class="type">void</span> QUndoGroup::<span class="name">undoTextChanged</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>undoText</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the active stack emits <a href="qundostack.html#undoTextChanged">QUndoStack::undoTextChanged</a>() or the active stack changes.</p>
<p><i>undoText</i> is the new state, or an empty string if the active stack is 0.</p>
<p><b>See also </b><a href="qundostack.html#undoTextChanged">QUndoStack::undoTextChanged</a>() and <a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@undoTextChanged -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2012 Nokia Corporation and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>