From b052b790dfe1cddccebf1ea52197c6781eeaf775 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 29 Dec 2013 18:11:20 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/csvimportdialog.cpp | 159 --------------- qt-ui/csvimportdialog.h | 10 +- qt-ui/csvimportdialog.ui | 459 ------------------------------------------ qt-ui/divelogimportdialog.cpp | 159 +++++++++++++++ qt-ui/divelogimportdialog.h | 53 +++++ qt-ui/divelogimportdialog.ui | 459 ++++++++++++++++++++++++++++++++++++++++++ qt-ui/mainwindow.cpp | 17 +- qt-ui/mainwindow.h | 3 +- qt-ui/mainwindow.ui | 23 +-- 9 files changed, 688 insertions(+), 654 deletions(-) delete mode 100644 qt-ui/csvimportdialog.cpp delete mode 100644 qt-ui/csvimportdialog.ui create mode 100644 qt-ui/divelogimportdialog.cpp create mode 100644 qt-ui/divelogimportdialog.h create mode 100644 qt-ui/divelogimportdialog.ui (limited to 'qt-ui') diff --git a/qt-ui/csvimportdialog.cpp b/qt-ui/csvimportdialog.cpp deleted file mode 100644 index 8ddf760f9..000000000 --- a/qt-ui/csvimportdialog.cpp +++ /dev/null @@ -1,159 +0,0 @@ -#include -#include -#include "csvimportdialog.h" -#include "mainwindow.h" -#include "ui_csvimportdialog.h" - -const CSVImportDialog::CSVAppConfig CSVImportDialog::CSVApps[CSVAPPS] = { - {"", }, - {"APD Log Viewer", 1, 2, 16, 7, 18, 19, "Tab"}, - {"XP5", 1, 2, 10, -1, -1, -1, "Tab"}, - {NULL,} -}; - -CSVImportDialog::CSVImportDialog(QWidget *parent) : - QDialog(parent), - selector(true), - ui(new Ui::CSVImportDialog) -{ - ui->setupUi(this); - - for (int i = 0; !CSVApps[i].name.isNull(); ++i) - ui->knownImports->addItem(CSVApps[i].name); - - ui->CSVSeparator->addItem("Tab"); - ui->CSVSeparator->addItem(","); - ui->knownImports->setCurrentIndex(1); - ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); - - connect(ui->CSVDepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); - connect(ui->CSVTime, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); - connect(ui->CSVTemperature, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); - connect(ui->temperatureCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool))); - connect(ui->CSVpo2, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); - connect(ui->po2CheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool))); - connect(ui->CSVcns, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); - connect(ui->cnsCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool))); - connect(ui->CSVstopdepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); - connect(ui->stopdepthCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool))); -} - -CSVImportDialog::~CSVImportDialog() -{ - delete ui; -} - -#define VALUE_IF_CHECKED(x) (ui->x->isEnabled() ? ui->x->value() - 1: -1) -void CSVImportDialog::on_buttonBox_accepted() -{ - char *error = NULL; - - if (ui->tabWidget->currentIndex() == 0) { - QStringList fileNames = ui->DiveLogFile->text().split(";"); - - /* - if (ui->ImportAdvanced->isChecked()) { - for (int i = 0; i < fileNames.size(); ++i) { - parse_xml_file_units(fileNames.at(i).toUtf8().data(), - ui->XMLImportFormat->currentIndex(), ui->XMLImportUnits->currentIndex(), - &error); - } - if (error != NULL) { - - mainWindow()->showError(error); - free(error); - error = NULL; - } - } else { - */ - mainWindow()->importFiles(fileNames); - return; - //} - - } else { - parse_csv_file(ui->CSVFile->text().toUtf8().data(), ui->CSVTime->value() - 1, - ui->CSVDepth->value() - 1, VALUE_IF_CHECKED(CSVTemperature), - VALUE_IF_CHECKED(CSVpo2), - VALUE_IF_CHECKED(CSVcns), - VALUE_IF_CHECKED(CSVstopdepth), - ui->CSVSeparator->currentIndex(), - &error); - if (error != NULL) { - mainWindow()->showError(error); - free(error); - error = NULL; - } - } - process_dives(TRUE, FALSE); - - mainWindow()->refreshDisplay(); -} - -void CSVImportDialog::on_CSVFileSelector_clicked() -{ - QString filename = QFileDialog::getOpenFileName(this, tr("Open CSV Log File"), ".", tr("CSV Files (*.csv);;All Files(*)")); - ui->CSVFile->setText(filename); - ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!filename.isEmpty()); -} - -#define SET_VALUE_AND_CHECKBOX(CSV, BOX, VAL) ({\ - ui->CSV->blockSignals(true);\ - ui->CSV->setValue(VAL);\ - ui->CSV->setEnabled(VAL >= 0);\ - ui->BOX->setChecked(VAL >= 0);\ - ui->CSV->blockSignals(false);\ - }) -void CSVImportDialog::on_knownImports_currentIndexChanged(int index) -{ - if (index == 0) - return; - - ui->CSVTime->blockSignals(true); - ui->CSVDepth->blockSignals(true); - ui->CSVTime->setValue(CSVApps[index].time); - ui->CSVDepth->setValue(CSVApps[index].depth); - ui->CSVTime->blockSignals(false); - ui->CSVDepth->blockSignals(false); - SET_VALUE_AND_CHECKBOX(CSVTemperature, temperatureCheckBox, CSVApps[index].temperature); - SET_VALUE_AND_CHECKBOX(CSVpo2, po2CheckBox, CSVApps[index].po2); - SET_VALUE_AND_CHECKBOX(CSVcns, cnsCheckBox, CSVApps[index].cns); - SET_VALUE_AND_CHECKBOX(CSVstopdepth, stopdepthCheckBox, CSVApps[index].stopdepth); -} - -void CSVImportDialog::unknownImports(bool arg1) -{ - unknownImports(); -} - -void CSVImportDialog::unknownImports(int arg1) -{ - unknownImports(); -} - -void CSVImportDialog::unknownImports() -{ - ui->knownImports->setCurrentIndex(0); -} - -void CSVImportDialog::on_CSVFile_textEdited() -{ - ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!ui->CSVFile->text().isEmpty()); -} - -void CSVImportDialog::on_DiveLogFileSelector_clicked() -{ - QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open Dive Log File"), ".", tr("XML Files (*.xml);;UDDF/UDCF Files(*.uddf *.udcf);;All Files(*)")); - ui->DiveLogFile->setText(fileNames.join(";")); - if (fileNames.size()) - ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); - else - ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); -} - -void CSVImportDialog::on_DiveLogFile_editingFinished() -{ - if (ui->DiveLogFile->text().size()) - ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); - else - ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); -} diff --git a/qt-ui/csvimportdialog.h b/qt-ui/csvimportdialog.h index 90dd2ac48..f062d49fd 100644 --- a/qt-ui/csvimportdialog.h +++ b/qt-ui/csvimportdialog.h @@ -7,16 +7,16 @@ #include "../divelist.h" namespace Ui { -class CSVImportDialog; +class DiveLogImportDialog; } -class CSVImportDialog : public QDialog +class DiveLogImportDialog : public QDialog { Q_OBJECT public: - explicit CSVImportDialog(QWidget *parent = 0); - ~CSVImportDialog(); + explicit DiveLogImportDialog(QWidget *parent = 0); + ~DiveLogImportDialog(); private slots: void on_buttonBox_accepted(); @@ -33,7 +33,7 @@ private: void unknownImports(); bool selector; - Ui::CSVImportDialog *ui; + Ui::DiveLogImportDialog *ui; struct CSVAppConfig { QString name; diff --git a/qt-ui/csvimportdialog.ui b/qt-ui/csvimportdialog.ui deleted file mode 100644 index 68e95d0a0..000000000 --- a/qt-ui/csvimportdialog.ui +++ /dev/null @@ -1,459 +0,0 @@ - - - CSVImportDialog - - - - 0 - 0 - 515 - 440 - - - - Import CSV file - - - - :/subsurface-icon - - - - - - - - Droid Sans [unknown] - 14 - 75 - true - - - - QFrame::NoFrame - - - Import Dive Log File - - - Qt::AlignCenter - - - - - - - 0 - - - - DiveLog - - - - - 10 - 10 - 441 - 65 - - - - - 0 - 0 - - - - Import File - - - - - - - - - ... - - - - - - - - - CSV - - - - - 10 - 10 - 441 - 65 - - - - - 0 - 0 - - - - Import File - - - - - - - - - ... - - - - - - - - - 210 - 88 - 281 - 65 - - - - Field Separator - - - - - - - - - - - 210 - 159 - 281 - 65 - - - - - 0 - 0 - - - - Pre-configured imports - - - - - - -1 - - - - - - - - - 16 - 88 - 185 - 246 - - - - - 0 - 0 - - - - Field Configuration - - - - - - 1 - - - false - - - 0 - - - - - - - 1 - - - 2 - - - - - - - 1 - - - false - - - - - - - Depth - - - - - - - 1 - - - false - - - 0 - - - - - - - Stopdepth - - - - - - - PO2 - - - - - - - Time - - - - - - - Temp - - - - - - - 1 - - - 1 - - - - - - - 1 - - - false - - - 0 - - - - - - - Cns - - - - - label - label_2 - CSVTime - CSVDepth - temperatureCheckBox - CSVTemperature - po2CheckBox - CSVpo2 - cnsCheckBox - CSVcns - stopdepthCheckBox - CSVstopdepth - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - - - 0 - - - 0 - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - - - - - - buttonBox - accepted() - CSVImportDialog - accept() - - - 310 - 286 - - - 215 - 164 - - - - - buttonBox - rejected() - CSVImportDialog - reject() - - - 310 - 286 - - - 215 - 164 - - - - - temperatureCheckBox - clicked(bool) - CSVTemperature - setEnabled(bool) - - - 77 - 191 - - - 161 - 191 - - - - - po2CheckBox - clicked(bool) - CSVpo2 - setEnabled(bool) - - - 77 - 223 - - - 161 - 223 - - - - - cnsCheckBox - clicked(bool) - CSVcns - setEnabled(bool) - - - 77 - 255 - - - 161 - 255 - - - - - stopdepthCheckBox - clicked(bool) - CSVstopdepth - setEnabled(bool) - - - 77 - 287 - - - 161 - 287 - - - - - diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp new file mode 100644 index 000000000..129dbd9d0 --- /dev/null +++ b/qt-ui/divelogimportdialog.cpp @@ -0,0 +1,159 @@ +#include +#include +#include "divelogimportdialog.h" +#include "mainwindow.h" +#include "ui_divelogimportdialog.h" + +const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] = { + {"", }, + {"APD Log Viewer", 1, 2, 16, 7, 18, 19, "Tab"}, + {"XP5", 1, 2, 10, -1, -1, -1, "Tab"}, + {NULL,} +}; + +DiveLogImportDialog::DiveLogImportDialog(QWidget *parent) : + QDialog(parent), + selector(true), + ui(new Ui::DiveLogImportDialog) +{ + ui->setupUi(this); + + for (int i = 0; !CSVApps[i].name.isNull(); ++i) + ui->knownImports->addItem(CSVApps[i].name); + + ui->CSVSeparator->addItem("Tab"); + ui->CSVSeparator->addItem(","); + ui->knownImports->setCurrentIndex(1); + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); + + connect(ui->CSVDepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); + connect(ui->CSVTime, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); + connect(ui->CSVTemperature, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); + connect(ui->temperatureCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool))); + connect(ui->CSVpo2, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); + connect(ui->po2CheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool))); + connect(ui->CSVcns, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); + connect(ui->cnsCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool))); + connect(ui->CSVstopdepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int))); + connect(ui->stopdepthCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool))); +} + +DiveLogImportDialog::~DiveLogImportDialog() +{ + delete ui; +} + +#define VALUE_IF_CHECKED(x) (ui->x->isEnabled() ? ui->x->value() - 1: -1) +void DiveLogImportDialog::on_buttonBox_accepted() +{ + char *error = NULL; + + if (ui->tabWidget->currentIndex() == 0) { + QStringList fileNames = ui->DiveLogFile->text().split(";"); + + /* + if (ui->ImportAdvanced->isChecked()) { + for (int i = 0; i < fileNames.size(); ++i) { + parse_xml_file_units(fileNames.at(i).toUtf8().data(), + ui->XMLImportFormat->currentIndex(), ui->XMLImportUnits->currentIndex(), + &error); + } + if (error != NULL) { + + mainWindow()->showError(error); + free(error); + error = NULL; + } + } else { + */ + mainWindow()->importFiles(fileNames); + return; + //} + + } else { + parse_csv_file(ui->CSVFile->text().toUtf8().data(), ui->CSVTime->value() - 1, + ui->CSVDepth->value() - 1, VALUE_IF_CHECKED(CSVTemperature), + VALUE_IF_CHECKED(CSVpo2), + VALUE_IF_CHECKED(CSVcns), + VALUE_IF_CHECKED(CSVstopdepth), + ui->CSVSeparator->currentIndex(), + &error); + if (error != NULL) { + mainWindow()->showError(error); + free(error); + error = NULL; + } + } + process_dives(TRUE, FALSE); + + mainWindow()->refreshDisplay(); +} + +void DiveLogImportDialog::on_CSVFileSelector_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Open CSV Log File"), ".", tr("CSV Files (*.csv);;All Files(*)")); + ui->CSVFile->setText(filename); + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!filename.isEmpty()); +} + +#define SET_VALUE_AND_CHECKBOX(CSV, BOX, VAL) ({\ + ui->CSV->blockSignals(true);\ + ui->CSV->setValue(VAL);\ + ui->CSV->setEnabled(VAL >= 0);\ + ui->BOX->setChecked(VAL >= 0);\ + ui->CSV->blockSignals(false);\ + }) +void DiveLogImportDialog::on_knownImports_currentIndexChanged(int index) +{ + if (index == 0) + return; + + ui->CSVTime->blockSignals(true); + ui->CSVDepth->blockSignals(true); + ui->CSVTime->setValue(CSVApps[index].time); + ui->CSVDepth->setValue(CSVApps[index].depth); + ui->CSVTime->blockSignals(false); + ui->CSVDepth->blockSignals(false); + SET_VALUE_AND_CHECKBOX(CSVTemperature, temperatureCheckBox, CSVApps[index].temperature); + SET_VALUE_AND_CHECKBOX(CSVpo2, po2CheckBox, CSVApps[index].po2); + SET_VALUE_AND_CHECKBOX(CSVcns, cnsCheckBox, CSVApps[index].cns); + SET_VALUE_AND_CHECKBOX(CSVstopdepth, stopdepthCheckBox, CSVApps[index].stopdepth); +} + +void DiveLogImportDialog::unknownImports(bool arg1) +{ + unknownImports(); +} + +void DiveLogImportDialog::unknownImports(int arg1) +{ + unknownImports(); +} + +void DiveLogImportDialog::unknownImports() +{ + ui->knownImports->setCurrentIndex(0); +} + +void DiveLogImportDialog::on_CSVFile_textEdited() +{ + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!ui->CSVFile->text().isEmpty()); +} + +void DiveLogImportDialog::on_DiveLogFileSelector_clicked() +{ + QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open Dive Log File"), ".", tr("XML Files (*.xml);;UDDF/UDCF Files(*.uddf *.udcf);;All Files(*)")); + ui->DiveLogFile->setText(fileNames.join(";")); + if (fileNames.size()) + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); + else + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); +} + +void DiveLogImportDialog::on_DiveLogFile_editingFinished() +{ + if (ui->DiveLogFile->text().size()) + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); + else + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); +} diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h new file mode 100644 index 000000000..9ecf32410 --- /dev/null +++ b/qt-ui/divelogimportdialog.h @@ -0,0 +1,53 @@ +#ifndef DIVELOGIMPORTDIALOG_H +#define DIVELOGIMPORTDIALOG_H + +#include +#include +#include "../dive.h" +#include "../divelist.h" + +namespace Ui { +class DiveLogImportDialog; +} + +class DiveLogImportDialog : public QDialog +{ + Q_OBJECT + +public: + explicit DiveLogImportDialog(QWidget *parent = 0); + ~DiveLogImportDialog(); + +private slots: + void on_buttonBox_accepted(); + void on_CSVFileSelector_clicked(); + void on_knownImports_currentIndexChanged(int index); + void on_CSVFile_textEdited(); + void unknownImports(int); + void unknownImports(bool); + + void on_DiveLogFileSelector_clicked(); + void on_DiveLogFile_editingFinished(); + +private: + void unknownImports(); + + bool selector; + Ui::DiveLogImportDialog *ui; + + struct CSVAppConfig { + QString name; + int time; + int depth; + int temperature; + int po2; + int cns; + int stopdepth; + QString separator; + }; + +#define CSVAPPS 4 + static const CSVAppConfig CSVApps[CSVAPPS]; +}; + +#endif // DIVELOGIMPORTDIALOG_H diff --git a/qt-ui/divelogimportdialog.ui b/qt-ui/divelogimportdialog.ui new file mode 100644 index 000000000..ac2315636 --- /dev/null +++ b/qt-ui/divelogimportdialog.ui @@ -0,0 +1,459 @@ + + + DiveLogImportDialog + + + + 0 + 0 + 515 + 440 + + + + Import dive log file + + + + :/subsurface-icon + + + + + + + + Droid Sans [unknown] + 14 + 75 + true + + + + QFrame::NoFrame + + + Import Dive Log File + + + Qt::AlignCenter + + + + + + + 0 + + + + DiveLog + + + + + 10 + 10 + 441 + 65 + + + + + 0 + 0 + + + + Import File + + + + + + + + + ... + + + + + + + + + CSV + + + + + 10 + 10 + 441 + 65 + + + + + 0 + 0 + + + + Import File + + + + + + + + + ... + + + + + + + + + 210 + 88 + 281 + 65 + + + + Field Separator + + + + + + + + + + + 210 + 159 + 281 + 65 + + + + + 0 + 0 + + + + Pre-configured imports + + + + + + -1 + + + + + + + + + 16 + 88 + 185 + 246 + + + + + 0 + 0 + + + + Field Configuration + + + + + + 1 + + + false + + + 0 + + + + + + + 1 + + + 2 + + + + + + + 1 + + + false + + + + + + + Depth + + + + + + + 1 + + + false + + + 0 + + + + + + + Stopdepth + + + + + + + PO2 + + + + + + + Time + + + + + + + Temp + + + + + + + 1 + + + 1 + + + + + + + 1 + + + false + + + 0 + + + + + + + Cns + + + + + label + label_2 + CSVTime + CSVDepth + temperatureCheckBox + CSVTemperature + po2CheckBox + CSVpo2 + cnsCheckBox + CSVcns + stopdepthCheckBox + CSVstopdepth + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + + + + + buttonBox + accepted() + DiveLogImportDialog + accept() + + + 310 + 286 + + + 215 + 164 + + + + + buttonBox + rejected() + DiveLogImportDialog + reject() + + + 310 + 286 + + + 215 + 164 + + + + + temperatureCheckBox + clicked(bool) + CSVTemperature + setEnabled(bool) + + + 77 + 191 + + + 161 + 191 + + + + + po2CheckBox + clicked(bool) + CSVpo2 + setEnabled(bool) + + + 77 + 223 + + + 161 + 223 + + + + + cnsCheckBox + clicked(bool) + CSVcns + setEnabled(bool) + + + 77 + 255 + + + 161 + 255 + + + + + stopdepthCheckBox + clicked(bool) + CSVstopdepth + setEnabled(bool) + + + 77 + 287 + + + 161 + 287 + + + + + 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(); } diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index d4e10e822..83672eafa 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -62,7 +62,6 @@ private slots: void on_actionSave_triggered(); void on_actionSaveAs_triggered(); void on_actionClose_triggered(); - void on_actionImport_triggered(); void on_actionExportUDDF_triggered(); void on_actionPrint_triggered(); void on_actionPreferences_triggered(); @@ -102,7 +101,7 @@ private slots: void current_dive_changed(int divenr); void initialUiSetup(); - void on_actionImportCSV_triggered(); + void on_actionImportDiveLog_triggered(); void linkClickedSlot(QUrl url); protected: diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index 60aa787e4..85896de75 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -197,8 +197,7 @@ &Import - - + @@ -264,17 +263,6 @@ Ctrl+W - - - Import Files - - - Import Files - - - Ctrl+I - - Export &UDDF @@ -461,12 +449,15 @@ Ctrl+L - + - Import CSV + Import Files - Import CS&V + Import Files + + + Ctrl+I -- cgit v1.2.3-70-g09d2