MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / setLocation

Method setLocation

Settings/LocationConfigTab.cpp:147–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void
148LocationConfigTab::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
169bool
170LocationConfigTab::hasChanged(void) const

Callers 1

LocationConfigTabMethod · 0.95

Calls 4

paintMapCoordsMethod · 0.95
setValueMethod · 0.80
valueMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected