aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2013-12-29 18:11:20 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-03 10:30:08 -0800
commitb052b790dfe1cddccebf1ea52197c6781eeaf775 (patch)
tree38aa1677dd898f7369d5ac27f1dbfa2fd6389dd5 /qt-ui/mainwindow.cpp
parent646c6ba58b28cc2a2dec8e0a2187158623416b6e (diff)
downloadsubsurface-b052b790dfe1cddccebf1ea52197c6781eeaf775.tar.gz
Refactoring import to DiveLogImportDialog
Changing the import stuff to DiveLogImport. Now we should have one import function/dialog for importing divelogs instead of multiple menu entries. 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.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index ad52c7d7f..c6e05faa4 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -35,7 +35,7 @@
#include "diveplanner.h"
#include "about.h"
#include "printdialog.h"
-#include "csvimportdialog.h"
+#include "divelogimportdialog.h"
static MainWindow* instance = 0;
@@ -167,15 +167,6 @@ void MainWindow::on_actionClose_triggered()
clear_events();
}
-void MainWindow::on_actionImport_triggered()
-{
- QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Import Files"), lastUsedDir(), filter());
- if (!fileNames.size())
- return; // no selection
- updateLastUsedDir(QFileInfo(fileNames.at(0)).dir().path());
- importFiles(fileNames);
-}
-
QString MainWindow::lastUsedDir()
{
QSettings settings;
@@ -864,10 +855,10 @@ void MainWindow::loadFiles(const QStringList fileNames)
ui.actionAutoGroup->setChecked(autogroup);
}
-void MainWindow::on_actionImportCSV_triggered()
+void MainWindow::on_actionImportDiveLog_triggered()
{
- CSVImportDialog *csvImport = new CSVImportDialog();
- csvImport->show();
+ DiveLogImportDialog *diveLogImport = new DiveLogImportDialog();
+ diveLogImport->show();
process_dives(TRUE, FALSE);
refreshDisplay();
}