From 512a2e6b684e237c5e6aacd3cba42fb7d2093e0a Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 28 Jan 2019 21:42:59 +0100 Subject: Undo: implement undo of suit editing This one was trivially modelled after notes editing. Only difference: the textChanged() signal was replaced by the editingFinished() signal so that we're not generating undo-commands on every key-press. Signed-off-by: Berthold Stoeger --- desktop-widgets/command_edit.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'desktop-widgets/command_edit.h') diff --git a/desktop-widgets/command_edit.h b/desktop-widgets/command_edit.h index d91121c7d..0209b7d64 100644 --- a/desktop-widgets/command_edit.h +++ b/desktop-widgets/command_edit.h @@ -56,6 +56,15 @@ public: DiveField fieldId() const override; }; +class EditSuit : public EditBase { +public: + using EditBase::EditBase; // Use constructor of base class. + void set(struct dive *d, QString s) const override; + QString data(struct dive *d) const override; + QString fieldName() const override; + DiveField fieldId() const override; +}; + class EditMode : public EditBase { int index; public: -- cgit v1.2.3-70-g09d2