summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command_divesite.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-03-14 08:26:50 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commit021aa4bd5742c575e56f36fd057e11679aaa35a5 (patch)
treed1380c7813cf5856929d14ec4492e57bcddacae1 /desktop-widgets/command_divesite.h
parent4d183e0d75a3ae5b536abb6ea254ba224d713f72 (diff)
downloadsubsurface-021aa4bd5742c575e56f36fd057e11679aaa35a5.tar.gz
Undo: implement undo of dive site country editing
Simply copy the code of notes editing, but use the taxonomy_* functions to read and set the value. Moreover, replace the three TAXONOMY_n field ids by a single TAXONOMY id. We will probably never show one column per taxonomy field, but rather a single column with a string derived from all taxonomy fields. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/command_divesite.h')
-rw-r--r--desktop-widgets/command_divesite.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop-widgets/command_divesite.h b/desktop-widgets/command_divesite.h
index ef3b2506f..f05bc765d 100644
--- a/desktop-widgets/command_divesite.h
+++ b/desktop-widgets/command_divesite.h
@@ -79,6 +79,19 @@ private:
QString value; // Value to be set
};
+
+class EditDiveSiteCountry : public Base {
+public:
+ EditDiveSiteCountry(dive_site *ds, const QString &country);
+private:
+ bool workToBeDone() override;
+ void undo() override;
+ void redo() override;
+
+ dive_site *ds;
+ QString value; // Value to be set
+};
+
} // namespace Command
#endif // COMMAND_DIVESITE_H