Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > d5e62c01ae8d1e579463c6a871dd44bf > files > 5204

qtbase5-doc-5.12.6-2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qundogroup.cpp -->
  <title>QUndoGroup Class | Qt Widgets 5.12.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QUndoGroup</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtwidgets-index.html">Qt 5.12.6 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<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="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QUndoGroup Class</h1>
<!-- $$$QUndoGroup-brief -->
<p>The <a href="qundogroup.html">QUndoGroup</a> class is a group of <a href="qundostack.html">QUndoStack</a> objects. <a href="#details">More...</a></p>
<!-- @@@QUndoGroup -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QUndoGroup&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += widgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.2</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="../qtcore/qobject.html">QObject</a></td></tr></table></div><ul>
<li><a href="qundogroup-members.html">List of all members, including inherited members</a></li>
<li><a href="qundogroup-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><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> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </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></div>
<ul>
<li class="fn">31 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><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></div>
<ul>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><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></div>
<ul>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> const QMetaObject </td><td class="memItemRight bottomAlign"><b><a href="qundogroup.html#staticMetaObject-var">staticMetaObject</a></b></td></tr>
</table></div>
<ul>
<li class="fn">9 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QUndoGroup-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qundogroup.html">QUndoGroup</a> 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 overview.</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><a href="qundogroup.html">QUndoGroup</a> 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="../qtcore/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 <a href="qundogroup.html">QUndoGroup</a> 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" id="QUndoGroup"><a name="QUndoGroup"></a>QUndoGroup::<span class="name">QUndoGroup</span>(<span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i>parent</i> = nullptr)</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" id="dtor.QUndoGroup"><a name="dtor.QUndoGroup"></a><code>[virtual] </code>QUndoGroup::<span class="name">~QUndoGroup</span>()</h3>
<p>Destroys the <a href="qundogroup.html">QUndoGroup</a>.</p>
<!-- @@@~QUndoGroup -->
<!-- $$$activeStack[overload1]$$$activeStack -->
<h3 class="fn" id="activeStack"><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 <code>nullptr</code>.</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" id="activeStackChanged"><a name="activeStackChanged"></a><code>[signal] </code><span class="type">void</span> QUndoGroup::<span class="name">activeStackChanged</span>(<span class="type"><a href="qundostack.html">QUndoStack</a></span> *<i>stack</i>)</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" id="addStack"><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="../qtcore/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 QObjects.</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" id="canRedo"><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 <code>false</code>.</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" id="canRedoChanged"><a name="canRedoChanged"></a><code>[signal] </code><span class="type">void</span> QUndoGroup::<span class="name">canRedoChanged</span>(<span class="type">bool</span> <i>canRedo</i>)</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" id="canUndo"><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 <code>false</code>.</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" id="canUndoChanged"><a name="canUndoChanged"></a><code>[signal] </code><span class="type">void</span> QUndoGroup::<span class="name">canUndoChanged</span>(<span class="type">bool</span> <i>canUndo</i>)</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" id="cleanChanged"><a name="cleanChanged"></a><code>[signal] </code><span class="type">void</span> QUndoGroup::<span class="name">cleanChanged</span>(<span class="type">bool</span> <i>clean</i>)</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" id="createRedoAction"><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="../qtcore/qobject.html#QObject">QObject</a></span> *<i>parent</i>, const <span class="type"><a href="../qtcore/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" id="createUndoAction"><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="../qtcore/qobject.html#QObject">QObject</a></span> *<i>parent</i>, const <span class="type"><a href="../qtcore/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" id="indexChanged"><a name="indexChanged"></a><code>[signal] </code><span class="type">void</span> QUndoGroup::<span class="name">indexChanged</span>(<span class="type">int</span> <i>idx</i>)</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" id="isClean"><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 <code>true</code>.</p>
<p><b>See also </b><a href="qundogroup.html#setActiveStack">setActiveStack</a>().</p>
<!-- @@@isClean -->
<!-- $$$redo[overload1]$$$redo -->
<h3 class="fn" id="redo"><a name="redo"></a><code>[slot] </code><span class="type">void</span> QUndoGroup::<span class="name">redo</span>()</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" id="redoText"><a name="redoText"></a><span class="type"><a href="../qtcore/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" id="redoTextChanged"><a name="redoTextChanged"></a><code>[signal] </code><span class="type">void</span> QUndoGroup::<span class="name">redoTextChanged</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>redoText</i>)</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" id="removeStack"><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" id="setActiveStack"><a name="setActiveStack"></a><code>[slot] </code><span class="type">void</span> QUndoGroup::<span class="name">setActiveStack</span>(<span class="type"><a href="qundostack.html">QUndoStack</a></span> *<i>stack</i>)</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" id="stacks"><a name="stacks"></a><span class="type"><a href="../qtcore/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" id="undo"><a name="undo"></a><code>[slot] </code><span class="type">void</span> QUndoGroup::<span class="name">undo</span>()</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" id="undoText"><a name="undoText"></a><span class="type"><a href="../qtcore/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" id="undoTextChanged"><a name="undoTextChanged"></a><code>[signal] </code><span class="type">void</span> QUndoGroup::<span class="name">undoTextChanged</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>undoText</i>)</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>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    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.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>