diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-04-26 10:55:41 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-26 17:20:32 -0700 |
commit | f6be4ccf226da8a8f5326ac742d2cebd83d599e9 (patch) | |
tree | a6a89c6cc77ab6735704cbe32432922f3830372a /qt-ui/mainwindow.cpp | |
parent | 2b559225d6ea480e1a5023900b8498b37fadf861 (diff) | |
download | subsurface-f6be4ccf226da8a8f5326ac742d2cebd83d599e9.tar.gz |
Add GUI support for exporting in CSV format
This patch adds an item to File menu to export all dives in CSV format.
Naturally this includes also the code to perform the export.
Fixes #434
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.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index f93ad2d23..5e8459ecd 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -280,7 +280,17 @@ void MainWindow::on_actionExportUDDF_triggered() QString filename = QFileDialog::getSaveFileName(this, tr("Export UDDF File as"), fi.absolutePath(), tr("UDDF files (*.uddf *.UDDF)")); if (!filename.isNull() && !filename.isEmpty()) - export_dives_uddf(filename.toUtf8(), false); + 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() |