Add tests and UI fields for #118

This commit is contained in:
2017-04-20 00:21:34 +03:00
parent 99c750fd0b
commit 8be4cc6e82
12 changed files with 144 additions and 5 deletions

View File

@ -299,6 +299,7 @@ int ExtWeather::showConfiguration(const QVariant args)
ui->checkBox_image->setCheckState(image() ? Qt::Checked : Qt::Unchecked);
ui->checkBox_active->setCheckState(isActive() ? Qt::Checked
: Qt::Unchecked);
ui->lineEdit_socket->setText(socket());
ui->spinBox_interval->setValue(interval());
int ret = exec();
@ -314,6 +315,7 @@ int ExtWeather::showConfiguration(const QVariant args)
setTs(ui->spinBox_timestamp->value());
setImage(ui->checkBox_image->checkState() == Qt::Checked);
setActive(ui->checkBox_active->checkState() == Qt::Checked);
setSocket(ui->lineEdit_socket->text());
setInterval(ui->spinBox_interval->value());
writeConfiguration();
@ -411,5 +413,6 @@ void ExtWeather::translate()
ui->label_timestamp->setText(i18n("Timestamp"));
ui->checkBox_image->setText(i18n("Use images"));
ui->checkBox_active->setText(i18n("Active"));
ui->label_socket->setText(i18n("Socket"));
ui->label_interval->setText(i18n("Interval"));
}