summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-05-20 19:33:32 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-21 03:31:43 +0900
commit7dc642860def420f85ae25548ddfa674e14636d1 (patch)
tree65f58d09ec8b5293550c124286fecf606bd23e73 /qt-ui/mainwindow.cpp
parent0b6cbe0f79d7707297211850963323eb77d21c20 (diff)
downloadsubsurface-7dc642860def420f85ae25548ddfa674e14636d1.tar.gz
Implementing export dialog
As our menus are getting many export entries, it is better to create a single export dialog where user is able to select the export type and whether to export selected dives or all of them. This should also be more intuitive than the current way when export from file menu export all dives and right click menu on divelist exports only selected dives. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp35
1 files changed, 7 insertions, 28 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 6ff0a68a4..d70e7b31e 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -43,6 +43,7 @@
#include "printdialog.h"
#endif
#include "divelogimportdialog.h"
+#include "divelogexportdialog.h"
#ifndef NO_USERMANUAL
#include "usermanual.h"
#endif
@@ -278,34 +279,6 @@ void MainWindow::updateLastUsedDir(const QString &dir)
s.setValue("LastDir", dir);
}
-void MainWindow::on_actionExportUDDF_triggered()
-{
- QFileInfo fi(system_default_filename());
- QString 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(), false, "uddf-export.xslt");
-}
-
-void MainWindow::on_actionExport_CSV_triggered()
-{
- QFileInfo fi(system_default_filename());
- QString 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(), false, "xml2csv.xslt");
-}
-
-void MainWindow::on_actionExportHTMLworldmap_triggered()
-{
- QFileInfo fi(system_default_filename());
- QString filename = QFileDialog::getSaveFileName(this, tr("Export World Map"), fi.absolutePath(),
- tr("HTML files (*.html)"));
- if (!filename.isNull() && !filename.isEmpty())
- export_worldmap_HTML(filename.toUtf8().data());
-}
-
void MainWindow::on_actionPrint_triggered()
{
#ifndef NO_PRINTING
@@ -1222,3 +1195,9 @@ void MainWindow::on_profScaled_clicked(bool triggered)
}
#undef TOOLBOX_PREF_PROFILE
+
+void MainWindow::on_actionExport_triggered()
+{
+ DiveLogExportDialog *diveLogExport = new DiveLogExportDialog();
+ diveLogExport->show();
+}