Show & edit trip location and notes when exactly one trip is selected

While we still show the selected_dive in the profile and use it for Dive
Info and Equipment, in the Dive Notes tab we now show the trip location
and trip notes (and none of the other fields), if the user directly
selects a whole trip by clicking on the trip header.

This clever reuse of the widget now allows trip location and notes to be
edited in place.

As a side note: the Gtk version has long allowed the user to edit the
trip location and trip notes, but nowhere did it ever SHOW the trip
notes... so this is more than just feature parity...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-06-14 09:17:46 -07:00
parent 8669de63e1
commit a960cd2d45
5 changed files with 135 additions and 76 deletions

View file

@ -29,6 +29,7 @@ public:
void unselectDives();
void selectDive(struct dive *, bool scrollto = false, bool toggle = false);
void contextMenuEvent(QContextMenuEvent *event);
QSet<dive_trip_t *> selectedTrips;
public slots:
void toggleColumnVisibilityByIndex();
@ -39,7 +40,7 @@ public slots:
void deleteDive();
void testSlot();
void fixMessyQtModelBehaviour();
Q_SIGNALS:
void currentDiveChanged(int divenr);