diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-02-24 21:22:33 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | d7d408a99e7459ec1a5fc2d9953e72924054b834 (patch) | |
tree | 2f283ef63c4e5c0352b648374f99043530b4520c /desktop-widgets/tab-widgets/maintab.h | |
parent | 9fd87fa08081116ba12812ddea0a43be61019cbb (diff) | |
download | subsurface-d7d408a99e7459ec1a5fc2d9953e72924054b834.tar.gz |
Undo: implement undo of dive trip editing
This is copying the dive editing code. It uses an OO design with
virtual functions for getting and setting the values. It doesn't
use templates though, as both fields of strig type. This feels
a bit over-engineered, but it is 1) consistent with the dive edit
code and 2) the number / types of dive trip fields might increase.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets/maintab.h')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.h b/desktop-widgets/tab-widgets/maintab.h index 83a19895a..6a41a1f64 100644 --- a/desktop-widgets/tab-widgets/maintab.h +++ b/desktop-widgets/tab-widgets/maintab.h @@ -39,7 +39,6 @@ public: enum EditMode { NONE, DIVE, - TRIP, ADD, MANUALLY_ADDED_DIVE, IGNORE @@ -62,6 +61,7 @@ signals: public slots: void divesChanged(dive_trip *trip, const QVector<dive *> &dives, DiveField field); + void tripChanged(dive_trip *trip, TripField field); void addCylinder_clicked(); void addWeight_clicked(); void updateDiveInfo(bool clear = false); @@ -76,8 +76,7 @@ slots: void on_divemaster_editingFinished(); void on_buddy_editingFinished(); void on_suit_editingFinished(); - void on_diveTripLocation_textEdited(const QString& text); - void on_notes_textChanged(); + void on_diveTripLocation_editingFinished(); void on_notes_editingFinished(); void on_airtemp_editingFinished(); void on_duration_editingFinished(); @@ -119,7 +118,6 @@ private: void copyTagsToDisplayedDive(); void markChangedWidget(QWidget *w); dive_trip_t *currentTrip; - dive_trip_t displayedTrip; QList<TabBase*> extraWidgets; }; |