summaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-18 17:20:35 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-18 17:20:35 -0800
commit48c4c21b9fe76127b35265f90f73abb4fa782500 (patch)
tree522e04de6ea3630ab0757e0fc886f982f804c899 /qt-ui/downloadfromdivecomputer.cpp
parent756abc0341756b7b6cac1cf49712cc85a0717dc4 (diff)
downloadsubsurface-48c4c21b9fe76127b35265f90f73abb4fa782500.tar.gz
Implement the '...' search button for Uemis dive computers
Right now the search button isn't connected for any device (clearly an oversight). At least for the Uemis I think I have a sane implementation of what that should do. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index 3c098cec3..87eb501cd 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -240,6 +240,20 @@ void DownloadFromDCWidget::fill_computer_list()
qSort(vendorList);
}
+void DownloadFromDCWidget::on_search_clicked()
+{
+ if (ui.vendor->currentText() == "Uemis") {
+ QString dirName = QFileDialog::getExistingDirectory(this,
+ tr("Find Uemis dive computer"),
+ QDir::homePath(),
+ QFileDialog::ShowDirsOnly);
+ qDebug() << dirName;
+ if (ui.device->findText(dirName) == -1)
+ ui.device->addItem(dirName);
+ ui.device->setEditText(dirName);
+ }
+}
+
void DownloadFromDCWidget::on_cancel_clicked()
{
updateState(CANCELLING);