Add menu entries for undo/redo

Add an edit menu with undo and redo submenus, and connect them to
the UndoBuffer class. The submenus are only enabled when needed.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Grace Karanja 2015-02-09 09:24:32 +01:00 committed by Dirk Hohndel
parent 853dfa6673
commit c5138b2090
3 changed files with 49 additions and 1 deletions

View file

@ -195,7 +195,7 @@ p, li { white-space: pre-wrap; }
<x>0</x>
<y>0</y>
<width>1682</width>
<height>27</height>
<height>25</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@ -271,7 +271,15 @@ p, li { white-space: pre-wrap; }
<addaction name="actionDownloadWeb"/>
<addaction name="actionDivelogs_de"/>
</widget>
<widget class="QMenu" name="menu_Edit">
<property name="title">
<string>&amp;Edit</string>
</property>
<addaction name="action_Undo"/>
<addaction name="action_Redo"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menu_Edit"/>
<addaction name="menuImport"/>
<addaction name="menuLog"/>
<addaction name="menuView"/>
@ -813,6 +821,22 @@ p, li { white-space: pre-wrap; }
<string>User &amp;survey</string>
</property>
</action>
<action name="action_Undo">
<property name="text">
<string>&amp;Undo</string>
</property>
<property name="shortcut">
<string>Ctrl+Z</string>
</property>
</action>
<action name="action_Redo">
<property name="text">
<string>&amp;Redo</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+Z</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>