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

@ -30,6 +30,7 @@ class QWebView;
class QSettings;
class UpdateManager;
class UserManual;
class UndoBuffer;
enum MainWindowTitleFormat {
MWTF_DEFAULT,
@ -82,6 +83,7 @@ public:
void setPlanNotes(const char *notes);
void printPlan();
void checkSurvey(QSettings *s);
UndoBuffer *undoBuffer;
private
slots:
/* file menu action */
@ -151,6 +153,9 @@ slots:
void on_paste_triggered();
void on_actionFilterTags_triggered();
void on_actionConfigure_Dive_Computer_triggered();
void on_action_Undo_triggered();
void on_action_Redo_triggered();
void checkForUndoAndRedo();
protected:
void closeEvent(QCloseEvent *);