diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-01-30 22:13:24 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | de579c1a1ad823fbc42d7e3122b77b03626283c3 (patch) | |
tree | afcb74e7c30f5235ba899fa02ca5e2b5e4ce581a /desktop-widgets/command_edit.h | |
parent | a12adf8e2a5a9fc2471874e69d31ce50bbaf4cb8 (diff) | |
download | subsurface-de579c1a1ad823fbc42d7e3122b77b03626283c3.tar.gz |
Undo: implement undo of air and water temperature editing
Mostly trivial. Since now on editing the field is re-set, the
validation function becomes unnecessary.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/command_edit.h')
-rw-r--r-- | desktop-widgets/command_edit.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/desktop-widgets/command_edit.h b/desktop-widgets/command_edit.h index 831f7f971..cc4ea2374 100644 --- a/desktop-widgets/command_edit.h +++ b/desktop-widgets/command_edit.h @@ -83,6 +83,24 @@ public: DiveField fieldId() const override; }; +class EditAirTemp : public EditBase<int> { +public: + using EditBase<int>::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 EditWaterTemp : public EditBase<int> { +public: + using EditBase<int>::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 EditMode : public EditBase<int> { int index; public: |