summaryrefslogtreecommitdiffstats
path: root/qt-ui/configuredivecomputerdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/configuredivecomputerdialog.cpp')
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 8a47e018d..92f4c3909 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -43,6 +43,7 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) :
connect(config, SIGNAL(deviceDetailsChanged(DeviceDetails*)),
this, SLOT(deviceDetailsReceived(DeviceDetails*)));
connect(ui.retrieveDetails, SIGNAL(clicked()), this, SLOT(readSettings()));
+ connect(ui.resetButton, SIGNAL(clicked()), this, SLOT(resetSettings()));
memset(&device_data, 0, sizeof(device_data));
fill_computer_list();
@@ -329,6 +330,15 @@ void ConfigureDiveComputerDialog::readSettings()
config->readSettings(&device_data);
}
+void ConfigureDiveComputerDialog::resetSettings()
+{
+ ui.statusLabel->clear();
+ ui.errorLabel->clear();
+
+ getDeviceData();
+ config->resetSettings(&device_data);
+}
+
void ConfigureDiveComputerDialog::configMessage(QString msg)
{
ui.statusLabel->setText(msg);