diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-01-28 22:35:07 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | 42cfd3f9638a5f9d37e51285e6d1eaaad3e78501 (patch) | |
tree | da20dbdfd7358638df99a20eab392cf894f9d609 /desktop-widgets/command_edit.h | |
parent | 512a2e6b684e237c5e6aacd3cba42fb7d2093e0a (diff) | |
download | subsurface-42cfd3f9638a5f9d37e51285e6d1eaaad3e78501.tar.gz |
Undo: implement undo of rating and visibility rating
This was rather trivial and modeled after the previous edit
UndoCommands. Since this is the first time we're editing
integers a new constructor instantiation had to be added.
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 0209b7d64..831f7f971 100644 --- a/desktop-widgets/command_edit.h +++ b/desktop-widgets/command_edit.h @@ -65,6 +65,24 @@ public: DiveField fieldId() const override; }; +class EditRating : 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 EditVisibility : 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: |