summaryrefslogtreecommitdiffstats
path: root/qt-ui/divelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r--qt-ui/divelistview.cpp34
1 files changed, 5 insertions, 29 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 07ce1f001..0e022d1cf 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -9,6 +9,7 @@
#include "modeldelegates.h"
#include "mainwindow.h"
#include "subsurfacewebservices.h"
+#include "divelogexportdialog.h"
#include "../display.h"
#include "exif.h"
#include "../file.h"
@@ -775,13 +776,10 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event)
if (amount_selected >= 1) {
popup.addAction(tr("renumber dive(s)"), this, SLOT(renumberDives()));
popup.addAction(tr("save As"), this, SLOT(saveSelectedDivesAs()));
- popup.addAction(tr("export As UDDF"), this, SLOT(exportSelectedDivesAsUDDF()));
- popup.addAction(tr("export As CSV"), this, SLOT(exportSelectedDivesAsCSV()));
+ popup.addAction(tr("export dive log"), this, SLOT(exportDives()));
popup.addAction(tr("shift times"), this, SLOT(shiftTimes()));
popup.addAction(tr("load images"), this, SLOT(loadImages()));
}
- if (d)
- popup.addAction(tr("upload dive(s) to divelogs.de"), this, SLOT(uploadToDivelogsDE()));
// "collapse all" really closes all trips,
// "collapse" keeps the trip with the selected dive open
QAction *actionTaken = popup.exec(event->globalPos());
@@ -821,29 +819,12 @@ void DiveListView::saveSelectedDivesAs()
save_dives_logic(bt.data(), true);
}
-void DiveListView::exportSelectedDivesAsUDDF()
+void DiveListView::exportDives()
{
- QString filename;
- QFileInfo fi(system_default_filename());
-
- filename = QFileDialog::getSaveFileName(this, tr("Export UDDF File as"), fi.absolutePath(),
- tr("UDDF files (*.uddf *.UDDF)"));
- if (!filename.isNull() && !filename.isEmpty())
- export_dives_xslt(filename.toUtf8(), true, "uddf-export.xslt");
-}
-
-void DiveListView::exportSelectedDivesAsCSV()
-{
- QString filename;
- QFileInfo fi(system_default_filename());
-
- filename = QFileDialog::getSaveFileName(this, tr("Export CSV File as"), fi.absolutePath(),
- tr("CSV files (*.csv *.CSV)"));
- if (!filename.isNull() && !filename.isEmpty())
- export_dives_xslt(filename.toUtf8(), true, "xml2csv.xslt");
+ DiveLogExportDialog *diveLogExport = new DiveLogExportDialog();
+ diveLogExport->show();
}
-
void DiveListView::shiftTimes()
{
ShiftTimesDialog::instance()->show();
@@ -913,11 +894,6 @@ void DiveListView::loadImages()
}
}
-void DiveListView::uploadToDivelogsDE()
-{
- DivelogsDeWebServices::instance()->prepareDivesForUpload();
-}
-
QString DiveListView::lastUsedImageDir()
{
QSettings settings;