From c82f4487f985a2d3fd832a1acce60fa052f9f246 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 10 Feb 2019 17:37:06 +0100 Subject: Undo: implement undo of depth and duration editing This was a bit different from the other editing commands: 1) Only the current dive is edited not all selected dives. Therefore, create a function that turns the current dive into a one-element list. 2) The profile has to be replot. Here, likewise, create a function to do that. Signed-off-by: Berthold Stoeger --- desktop-widgets/command_edit.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'desktop-widgets/command_edit.h') diff --git a/desktop-widgets/command_edit.h b/desktop-widgets/command_edit.h index d10da4325..081ea11bb 100644 --- a/desktop-widgets/command_edit.h +++ b/desktop-widgets/command_edit.h @@ -102,6 +102,24 @@ public: DiveField fieldId() const override; }; +class EditDuration : public EditBase { +public: + using EditBase::EditBase; // Use constructor of base class. + void set(struct dive *d, int value) const override; + int data(struct dive *d) const override; + QString fieldName() const override; + DiveField fieldId() const override; +}; + +class EditDepth : public EditBase { +public: + using EditBase::EditBase; // Use constructor of base class. + void set(struct dive *d, int value) const override; + int data(struct dive *d) const override; + QString fieldName() const override; + DiveField fieldId() const override; +}; + class EditDiveSite : public EditBase { public: using EditBase::EditBase; // Use constructor of base class. -- cgit v1.2.3-70-g09d2