aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/divelistview.cpp
diff options
context:
space:
mode:
authorGravatar Robert Helling <helling@lmu.de>2013-11-18 14:53:05 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-18 10:03:45 -0800
commit4966336e1d6c729e5763aa3ac607c77f8794e5da (patch)
tree0c7183ea8570f38c366e8145557937af8d416821 /qt-ui/divelistview.cpp
parente289881db9727b5bcfec12c3c390cdd6743f7472 (diff)
downloadsubsurface-4966336e1d6c729e5763aa3ac607c77f8794e5da.tar.gz
Shift times of selected dives
This patch adds the possibility to shift the times of all selected dives by a fixed amount to correct for time zone problems or mis-set dive computer clocks. Select the dives and right click in the dive list. [Dirk Hohndel: added .ui file to FORMS and fixed some whitespace damage] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r--qt-ui/divelistview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 95f85d604..ca0ea5713 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -614,6 +614,7 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event)
if (amount_selected >= 1) {
popup.addAction(tr("save As"), this, SLOT(saveSelectedDivesAs()));
popup.addAction(tr("export As UDDF"), this, SLOT(exportSelectedDivesAsUDDF()));
+ popup.addAction(tr("shift times"), this, SLOT(shiftTimes()));
}
// "collapse all" really closes all trips,
// "collapse" keeps the trip with the selected dive open
@@ -664,3 +665,9 @@ void DiveListView::exportSelectedDivesAsUDDF()
if (!filename.isNull() && !filename.isEmpty())
export_dives_uddf(filename.toUtf8(), true);
}
+
+
+void DiveListView::shiftTimes()
+{
+ ShiftTimesDialog::instance()->show();
+}