Sophie

Sophie

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

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" />
<!-- qundoview.cpp -->
  <title>QUndoView 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 >QUndoView</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="#properties">Properties</a></li>
<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="#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">QUndoView Class</h1>
<!-- $$$QUndoView-brief -->
<p>The <a href="qundoview.html">QUndoView</a> class displays the contents of a <a href="qundostack.html">QUndoStack</a>. <a href="#details">More...</a></p>
<!-- @@@QUndoView -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QUndoView&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="qlistview.html">QListView</a></td></tr></table></div><ul>
<li><a href="qundoview-members.html">List of all members, including inherited members</a></li>
<li><a href="qundoview-obsolete.html">Obsolete members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qundoview.html#cleanIcon-prop">cleanIcon</a></b> : QIcon</li>
<li class="fn"><b><a href="qundoview.html#emptyLabel-prop">emptyLabel</a></b> : QString</li>
</ul>
<ul>
<li class="fn">14 properties inherited from <a href="qlistview.html#properties">QListView</a></li>
<li class="fn">16 properties inherited from <a href="qabstractitemview.html#properties">QAbstractItemView</a></li>
<li class="fn">3 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li>
<li class="fn">6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
<li class="fn">59 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</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="qundoview.html#QUndoView">QUndoView</a></b>(QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qundoview.html#QUndoView-1">QUndoView</a></b>(QUndoStack *<i>stack</i>, QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qundoview.html#QUndoView-2">QUndoView</a></b>(QUndoGroup *<i>group</i>, QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qundoview.html#dtor.QUndoView">~QUndoView</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIcon </td><td class="memItemRight bottomAlign"><b><a href="qundoview.html#cleanIcon-prop">cleanIcon</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qundoview.html#emptyLabel-prop">emptyLabel</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUndoGroup *</td><td class="memItemRight bottomAlign"><b><a href="qundoview.html#group">group</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundoview.html#cleanIcon-prop">setCleanIcon</a></b>(const QIcon &amp;<i>icon</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundoview.html#emptyLabel-prop">setEmptyLabel</a></b>(const QString &amp;<i>label</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUndoStack *</td><td class="memItemRight bottomAlign"><b><a href="qundoview.html#stack">stack</a></b>() const</td></tr>
</table></div>
<ul>
<li class="fn">34 public functions inherited from <a href="qlistview.html#public-functions">QListView</a></li>
<li class="fn">60 public functions inherited from <a href="qabstractitemview.html#public-functions">QAbstractItemView</a></li>
<li class="fn">20 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li>
<li class="fn">14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
<li class="fn">214 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">31 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
<li class="fn">14 public functions inherited from <a href="../qtgui/qpaintdevice.html#public-functions">QPaintDevice</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="qundoview.html#setGroup">setGroup</a></b>(QUndoGroup *<i>group</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qundoview.html#setStack">setStack</a></b>(QUndoStack *<i>stack</i>)</td></tr>
</table></div>
<ul>
<li class="fn">9 public slots inherited from <a href="qabstractitemview.html#public-slots">QAbstractItemView</a></li>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">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="qundoview.html#staticMetaObject-var">staticMetaObject</a></b></td></tr>
</table></div>
<ul>
<li class="fn">5 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<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 signal inherited from <a href="qlistview.html#signals">QListView</a></li>
<li class="fn">7 signals inherited from <a href="qabstractitemview.html#signals">QAbstractItemView</a></li>
<li class="fn">3 signals inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
<li class="fn">28 protected functions inherited from <a href="qlistview.html#protected-functions">QListView</a></li>
<li class="fn">38 protected functions inherited from <a href="qabstractitemview.html#protected-functions">QAbstractItemView</a></li>
<li class="fn">20 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li>
<li class="fn">4 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li>
<li class="fn">35 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="../qtgui/qpaintdevice.html#protected-functions">QPaintDevice</a></li>
<li class="fn">9 protected slots inherited from <a href="qabstractitemview.html#protected-slots">QAbstractItemView</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QUndoView-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qundoview.html">QUndoView</a> class displays the contents of a <a href="qundostack.html">QUndoStack</a>.</p>
<p><a href="qundoview.html">QUndoView</a> is a <a href="qlistview.html">QListView</a> which displays the list of commands pushed on an undo stack. The most recently executed command is always selected. Selecting a different command results in a call to <a href="qundostack.html#setIndex">QUndoStack::setIndex</a>(), rolling the state of the document backwards or forward to the new command.</p>
<p>The stack can be set explicitly with <a href="qundoview.html#setStack">setStack</a>(). Alternatively, a <a href="qundogroup.html">QUndoGroup</a> object can be set with <a href="qundoview.html#setGroup">setGroup</a>(). The view will then update itself automatically whenever the active stack of the group changes.</p>
<p class="centerAlign"><img src="images/qundoview.png" alt="" /></p></div>
<!-- @@@QUndoView -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$cleanIcon-prop$$$cleanIcon$$$setCleanIconconstQIcon& -->
<h3 class="fn" id="cleanIcon-prop"><a name="cleanIcon-prop"></a><span class="name">cleanIcon</span> : <span class="type"><a href="../qtgui/qicon.html">QIcon</a></span></h3>
<p>This property holds the icon used to represent the clean state.</p>
<p>A stack may have a clean state set with <a href="qundostack.html#setClean">QUndoStack::setClean</a>(). This is usually the state of the document at the point it was saved. <a href="qundoview.html">QUndoView</a> can display an icon in the list of commands to show the clean state. If this property is a null icon, no icon is shown. The default value is the null icon.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QIcon </td><td class="memItemRight bottomAlign"><span class="name"><b>cleanIcon</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCleanIcon</b></span>(const QIcon &amp;<i>icon</i>)</td></tr>
</table></div>
<!-- @@@cleanIcon -->
<!-- $$$emptyLabel-prop$$$emptyLabel$$$setEmptyLabelconstQString& -->
<h3 class="fn" id="emptyLabel-prop"><a name="emptyLabel-prop"></a><span class="name">emptyLabel</span> : <span class="type"><a href="../qtcore/qstring.html">QString</a></span></h3>
<p>This property holds the label used for the empty state.</p>
<p>The empty label is the topmost element in the list of commands, which represents the state of the document before any commands were pushed on the stack. The default is the string &quot;&lt;empty&gt;&quot;.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>emptyLabel</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setEmptyLabel</b></span>(const QString &amp;<i>label</i>)</td></tr>
</table></div>
<!-- @@@emptyLabel -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QUndoView[overload1]$$$QUndoViewQWidget* -->
<h3 class="fn" id="QUndoView"><a name="QUndoView"></a>QUndoView::<span class="name">QUndoView</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = nullptr)</h3>
<p>Constructs a new view with parent <i>parent</i>.</p>
<!-- @@@QUndoView -->
<!-- $$$QUndoView$$$QUndoViewQUndoStack*QWidget* -->
<h3 class="fn" id="QUndoView-1"><a name="QUndoView-1"></a>QUndoView::<span class="name">QUndoView</span>(<span class="type"><a href="qundostack.html">QUndoStack</a></span> *<i>stack</i>, <span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = nullptr)</h3>
<p>Constructs a new view with parent <i>parent</i> and sets the observed stack to <i>stack</i>.</p>
<!-- @@@QUndoView -->
<!-- $$$QUndoView$$$QUndoViewQUndoGroup*QWidget* -->
<h3 class="fn" id="QUndoView-2"><a name="QUndoView-2"></a>QUndoView::<span class="name">QUndoView</span>(<span class="type"><a href="qundogroup.html">QUndoGroup</a></span> *<i>group</i>, <span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = nullptr)</h3>
<p>Constructs a new view with parent <i>parent</i> and sets the observed group to <i>group</i>.</p>
<p>The view will update itself autmiatically whenever the active stack of the group changes.</p>
<!-- @@@QUndoView -->
<!-- $$$~QUndoView[overload1]$$$~QUndoView -->
<h3 class="fn" id="dtor.QUndoView"><a name="dtor.QUndoView"></a><code>[virtual] </code>QUndoView::<span class="name">~QUndoView</span>()</h3>
<p>Destroys this view.</p>
<!-- @@@~QUndoView -->
<!-- $$$group[overload1]$$$group -->
<h3 class="fn" id="group"><a name="group"></a><span class="type"><a href="qundogroup.html">QUndoGroup</a></span> *QUndoView::<span class="name">group</span>() const</h3>
<p>Returns the group displayed by this view.</p>
<p>If the view is not looking at group, this function returns <code>nullptr</code>.</p>
<p><b>See also </b><a href="qundoview.html#setGroup">setGroup</a>() and <a href="qundoview.html#setStack">setStack</a>().</p>
<!-- @@@group -->
<!-- $$$setGroup[overload1]$$$setGroupQUndoGroup* -->
<h3 class="fn" id="setGroup"><a name="setGroup"></a><code>[slot] </code><span class="type">void</span> QUndoView::<span class="name">setGroup</span>(<span class="type"><a href="qundogroup.html">QUndoGroup</a></span> *<i>group</i>)</h3>
<p>Sets the group displayed by this view to <i>group</i>. If <i>group</i> is 0, the view will be empty.</p>
<p>The view will update itself autmiatically whenever the active stack of the group changes.</p>
<p><b>See also </b><a href="qundoview.html#group">group</a>() and <a href="qundoview.html#setStack">setStack</a>().</p>
<!-- @@@setGroup -->
<!-- $$$setStack[overload1]$$$setStackQUndoStack* -->
<h3 class="fn" id="setStack"><a name="setStack"></a><code>[slot] </code><span class="type">void</span> QUndoView::<span class="name">setStack</span>(<span class="type"><a href="qundostack.html">QUndoStack</a></span> *<i>stack</i>)</h3>
<p>Sets the stack displayed by this view to <i>stack</i>. If <i>stack</i> is 0, the view will be empty.</p>
<p>If the view was previously looking at a <a href="qundogroup.html">QUndoGroup</a>, the group is set to 0.</p>
<p><b>See also </b><a href="qundoview.html#stack">stack</a>() and <a href="qundoview.html#setGroup">setGroup</a>().</p>
<!-- @@@setStack -->
<!-- $$$stack[overload1]$$$stack -->
<h3 class="fn" id="stack"><a name="stack"></a><span class="type"><a href="qundostack.html">QUndoStack</a></span> *QUndoView::<span class="name">stack</span>() const</h3>
<p>Returns the stack currently displayed by this view. If the view is looking at a <a href="qundogroup.html">QUndoGroup</a>, this the group's active stack.</p>
<p><b>See also </b><a href="qundoview.html#setStack">setStack</a>() and <a href="qundoview.html#setGroup">setGroup</a>().</p>
<!-- @@@stack -->
</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>