<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- undo.qdoc --> <title>Undo Framework | 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 >Undo Framework</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="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">Undo Framework</h1> <span class="subtitle"></span> <!-- $$$tools/undo-brief --> <p>This example shows Qt's undo framework in action.</p> <!-- @@@tools/undo --> <!-- $$$tools/undo-description --> <div class="descr"> <a name="details"></a> <p class="centerAlign"><img src="images/undodemo.png" alt="" /></p><p>Qt's undo framework is an implementation of the Command pattern, which provides advanced undo/redo functionality.</p> <p>To show the abilities of the framework, we have implemented a small diagram application in which the diagram items are geometric primitives. You can edit the diagram in the following ways: add, move, change the color of, and delete the items.</p> <p>Files:</p> <ul> <li><a href="qtwidgets-tools-undo-commands-cpp.html">tools/undo/commands.cpp</a></li> <li><a href="qtwidgets-tools-undo-commands-h.html">tools/undo/commands.h</a></li> <li><a href="qtwidgets-tools-undo-document-cpp.html">tools/undo/document.cpp</a></li> <li><a href="qtwidgets-tools-undo-document-h.html">tools/undo/document.h</a></li> <li><a href="qtwidgets-tools-undo-main-cpp.html">tools/undo/main.cpp</a></li> <li><a href="qtwidgets-tools-undo-mainwindow-cpp.html">tools/undo/mainwindow.cpp</a></li> <li><a href="qtwidgets-tools-undo-mainwindow-h.html">tools/undo/mainwindow.h</a></li> <li><a href="qtwidgets-tools-undo-mainwindow-ui.html">tools/undo/mainwindow.ui</a></li> <li><a href="qtwidgets-tools-undo-undo-pro.html">tools/undo/undo.pro</a></li> <li><a href="qtwidgets-tools-undo-undo-qrc.html">tools/undo/undo.qrc</a></li> </ul> <p>Images:</p> <ul> <li><a href="images/used-in-examples/tools/undo/icons/background.png">tools/undo/icons/background.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/blue.png">tools/undo/icons/blue.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/circle.png">tools/undo/icons/circle.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/exit.png">tools/undo/icons/exit.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/fileclose.png">tools/undo/icons/fileclose.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/filenew.png">tools/undo/icons/filenew.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/fileopen.png">tools/undo/icons/fileopen.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/filesave.png">tools/undo/icons/filesave.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/green.png">tools/undo/icons/green.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/ok.png">tools/undo/icons/ok.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/rectangle.png">tools/undo/icons/rectangle.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/red.png">tools/undo/icons/red.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/redo.png">tools/undo/icons/redo.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/remove.png">tools/undo/icons/remove.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/triangle.png">tools/undo/icons/triangle.png</a></li> <li><a href="images/used-in-examples/tools/undo/icons/undo.png">tools/undo/icons/undo.png</a></li> </ul> </div> <!-- @@@tools/undo --> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</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>