mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
756abc0341
commit
48c4c21b9f
2 changed files with 15 additions and 0 deletions
|
@ -240,6 +240,20 @@ void DownloadFromDCWidget::fill_computer_list()
|
||||||
qSort(vendorList);
|
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()
|
void DownloadFromDCWidget::on_cancel_clicked()
|
||||||
{
|
{
|
||||||
updateState(CANCELLING);
|
updateState(CANCELLING);
|
||||||
|
|
|
@ -38,6 +38,7 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
void on_ok_clicked();
|
void on_ok_clicked();
|
||||||
void on_cancel_clicked();
|
void on_cancel_clicked();
|
||||||
|
void on_search_clicked();
|
||||||
void on_vendor_currentIndexChanged(const QString& vendor);
|
void on_vendor_currentIndexChanged(const QString& vendor);
|
||||||
void on_product_currentIndexChanged();
|
void on_product_currentIndexChanged();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue