diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index c5d57e6a5..f1bb05823 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -99,6 +99,9 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) :
ui.ok->setEnabled(false);
ui.downloadCancelRetryButton->setEnabled(true);
ui.downloadCancelRetryButton->setText(tr("Download"));
+ ui.chooseBluetoothDevice->setEnabled(ui.bluetoothMode->isChecked());
+ connect(ui.bluetoothMode, SIGNAL(stateChanged(int)), this, SLOT(enableBluetoothMode(int)));
+ connect(ui.chooseBluetoothDevice, SIGNAL(clicked()), this, SLOT(selectRemoteBluetoothDevice()));
}
void DownloadFromDCWidget::updateProgressBar()
@@ -493,6 +496,8 @@ void DownloadFromDCWidget::markChildrenAsDisabled()
ui.chooseDumpFile->setEnabled(false);
ui.selectAllButton->setEnabled(false);
ui.unselectAllButton->setEnabled(false);
+ ui.bluetoothMode->setEnabled(false);
+ ui.chooseBluetoothDevice->setEnabled(false);
}
void DownloadFromDCWidget::markChildrenAsEnabled()
@@ -512,6 +517,20 @@ void DownloadFromDCWidget::markChildrenAsEnabled()
ui.chooseDumpFile->setEnabled(true);
ui.selectAllButton->setEnabled(true);
ui.unselectAllButton->setEnabled(true);
+ ui.bluetoothMode->setEnabled(true);
+ ui.chooseBluetoothDevice->setEnabled(true);
+}
+
+void DownloadFromDCWidget::selectRemoteBluetoothDevice()
+{
+ //TODO add implementation
+}
+
+void DownloadFromDCWidget::enableBluetoothMode(int state)
+{
+ ui.chooseBluetoothDevice->setEnabled(state == Qt::Checked);
+ if (state == Qt::Checked)
+ selectRemoteBluetoothDevice();
}
static void fillDeviceList(const char *name, void *data)
diff --git a/qt-ui/downloadfromdivecomputer.h b/qt-ui/downloadfromdivecomputer.h
index 92db09d66..0b63d28ed 100644
--- a/qt-ui/downloadfromdivecomputer.h
+++ b/qt-ui/downloadfromdivecomputer.h
@@ -77,8 +77,10 @@ slots:
void updateProgressBar();
void checkLogFile(int state);
void checkDumpFile(int state);
+ void enableBluetoothMode(int state);
void pickDumpFile();
void pickLogFile();
+ void selectRemoteBluetoothDevice();
private:
void markChildrenAsDisabled();
diff --git a/qt-ui/downloadfromdivecomputer.ui b/qt-ui/downloadfromdivecomputer.ui
index ff809355f..f232967fd 100644
--- a/qt-ui/downloadfromdivecomputer.ui
+++ b/qt-ui/downloadfromdivecomputer.ui
@@ -116,6 +116,23 @@
+ -
+
+
+ Choose Bluetooth Download mode
+
+
+
+ -
+
+
+ Select a remote Bluetooth device.
+
+
+ ...
+
+
+
-