summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-01-25 18:27:31 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commit9e603cbe2bbcae1822859b284c39dd804bf321fb (patch)
tree9b4091c07aeea8b4abe65593ab07abc2c7326a52 /desktop-widgets/command.h
parent8858bfa1f8cf30cc4eb070fb6e709f7051e61241 (diff)
downloadsubsurface-9e603cbe2bbcae1822859b284c39dd804bf321fb.tar.gz
Undo: implement rudimentary undo of dive-notes editing
Implement a first rudimentary dive-editing command. The main code resides in a base class Command::Edit, which calls virtual functions to read / set the fields and extract the field name. Implement an example: editing of dive notes. This dose not yet update the UI on undo / redo. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/command.h')
-rw-r--r--desktop-widgets/command.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/desktop-widgets/command.h b/desktop-widgets/command.h
index 134bb0147..4c31baa6e 100644
--- a/desktop-widgets/command.h
+++ b/desktop-widgets/command.h
@@ -10,7 +10,6 @@
namespace Command {
// 1) General commands
-
void clear(); // Reset the undo stack. Delete all commands.
QAction *undoAction(QObject *parent); // Create an undo action.
QAction *redoAction(QObject *parent); // Create an redo action.
@@ -51,6 +50,10 @@ void addDiveSite(const QString &name);
void mergeDiveSites(dive_site *ds, const QVector<dive_site *> &sites);
void purgeUnusedDiveSites();
+// 4) Dive editing related commands
+
+void editNotes(const QVector<dive *> dives, const QString &newValue, const QString &oldValue);
+
} // namespace Command
#endif // COMMAND_H