| 145 | } |
| 146 | |
| 147 | void |
| 148 | LocationConfigTab::setLocation(Suscan::Location const &loc) |
| 149 | { |
| 150 | this->current = loc; |
| 151 | |
| 152 | this->ui->latitudeSpinBox->setValue(loc.site.lat); |
| 153 | this->ui->longitudeSpinBox->setValue(loc.site.lon); |
| 154 | this->ui->altitudeSpinBox->setValue(loc.site.height * 1e3); |
| 155 | this->ui->cityNameEdit->setText(QString::fromStdString(loc.name)); |
| 156 | |
| 157 | if (this->countryList.find(QString::fromStdString(loc.country)) != |
| 158 | this->countryList.end()) |
| 159 | this->ui->countryCombo->setCurrentIndex( |
| 160 | this->countryList[QString::fromStdString(loc.country)]); |
| 161 | |
| 162 | this->paintMapCoords( |
| 163 | this->ui->latitudeSpinBox->value(), |
| 164 | this->ui->longitudeSpinBox->value()); |
| 165 | |
| 166 | this->modified = false; |
| 167 | } |
| 168 | |
| 169 | bool |
| 170 | LocationConfigTab::hasChanged(void) const |
no test coverage detected