aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command_edit.h
diff options
context:
space:
mode:
authorGravatar willemferguson <willemferguson@zoology.up.ac.za>2019-04-30 12:42:33 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-05-15 07:37:14 -0700
commit1bdf00b2b472078a0b24f1c269782d822cb96e02 (patch)
tree13a5e784118d9abb0a1bc1dfa9cbe4a9f457de80 /desktop-widgets/command_edit.h
parentca6aa3813956b5e8be68b86ed36a5786b3ee746f (diff)
downloadsubsurface-1bdf00b2b472078a0b24f1c269782d822cb96e02.tar.gz
Convert the atmospheric pressure in the Information Tab to an editable field
The Information tab shows the atmospheric pressure. Make this value editable and also ensure that changes to it are undo-able. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Diffstat (limited to 'desktop-widgets/command_edit.h')
-rw-r--r--desktop-widgets/command_edit.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop-widgets/command_edit.h b/desktop-widgets/command_edit.h
index 1f627c7ef..a1050d65e 100644
--- a/desktop-widgets/command_edit.h
+++ b/desktop-widgets/command_edit.h
@@ -102,6 +102,15 @@ public:
DiveField fieldId() const override;
};
+class EditAtmPress : 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 EditDuration : public EditBase<int> {
public:
using EditBase<int>::EditBase; // Use constructor of base class.