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