summaryrefslogtreecommitdiff
path: root/plugins/autotest/squishsettingspage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/autotest/squishsettingspage.cpp')
-rw-r--r--plugins/autotest/squishsettingspage.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/autotest/squishsettingspage.cpp b/plugins/autotest/squishsettingspage.cpp
index 4c94dd5fb7..9325e928e6 100644
--- a/plugins/autotest/squishsettingspage.cpp
+++ b/plugins/autotest/squishsettingspage.cpp
@@ -31,20 +31,39 @@ SquishSettingsWidget::SquishSettingsWidget(QWidget *parent)
: QWidget(parent)
{
m_ui.setupUi(this);
+
+ connect(m_ui.localCheckBox, &QCheckBox::toggled,
+ this, &SquishSettingsWidget::onLocalToggled);
}
void SquishSettingsWidget::setSettings(const SquishSettings &settings)
{
m_ui.squishPathChooser->setFileName(settings.squishPath);
+ m_ui.licensePathChooser->setFileName(settings.licensePath);
+ m_ui.localCheckBox->setChecked(settings.local);
+ m_ui.serverHostLineEdit->setText(settings.serverHost);
+ m_ui.serverPortSpinBox->setValue(settings.serverPort);
+ m_ui.verboseCheckBox->setChecked(settings.verbose);
}
SquishSettings SquishSettingsWidget::settings() const
{
SquishSettings result;
result.squishPath = m_ui.squishPathChooser->fileName();
+ result.licensePath = m_ui.licensePathChooser->fileName();
+ result.local = m_ui.localCheckBox->checkState() == Qt::Checked;
+ result.serverHost = m_ui.serverHostLineEdit->text();
+ result.serverPort = m_ui.serverPortSpinBox->value();
+ result.verbose = m_ui.verboseCheckBox->checkState() == Qt::Checked;
return result;
}
+void SquishSettingsWidget::onLocalToggled(bool checked)
+{
+ m_ui.serverHostLineEdit->setEnabled(!checked);
+ m_ui.serverPortSpinBox->setEnabled(!checked);
+}
+
SquishSettingsPage::SquishSettingsPage(const QSharedPointer<SquishSettings> &settings)
: m_settings(settings), m_widget(0)
{