Qt: Implement trip merging logic

So during my Maui trip, I had a short hiatus in diving, causing
subsurface to start a new trip for the last day of diving.  I could have
just started the old gtk branch to fix it up, but decided that I might
as well try to implement the "merge trip" logic in the Qt branch instead.

This is the end result of that.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2013-06-26 19:16:40 -10:00 committed by Dirk Hohndel
parent c7f8ada4ff
commit 5ce5b05521
4 changed files with 42 additions and 1 deletions

View file

@ -40,6 +40,8 @@ public slots:
void deleteDive();
void testSlot();
void fixMessyQtModelBehaviour();
void mergeTripAbove();
void mergeTripBelow();
signals:
void currentDiveChanged(int divenr);
@ -50,6 +52,7 @@ private:
DiveTripModel::Layout currentLayout;
QLineEdit *searchBox;
QModelIndex contextMenuIndex;
void merge_trip(const QModelIndex &a, const int offset);
};
#endif // DIVELISTVIEW_H