mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
8858bfa1f8
commit
9e603cbe2b
7 changed files with 177 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue