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

Method populateLocations

Settings/LocationConfigTab.cpp:95–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void
96LocationConfigTab::populateLocations(void)
97{
98 Suscan::Singleton *sus = Suscan::Singleton::get_instance();
99 int index = 0;
100
101 for (auto i = sus->getFirstLocation(); i != sus->getLastLocation(); ++i) {
102 QString country;
103 QListWidgetItem *item = new QListWidgetItem(i->getLocationName());
104 this->ui->cityListWidget->addItem(item);
105
106 country = QString::fromStdString(i->country);
107
108 if (this->countryList.find(country) == this->countryList.end())
109 this->countryList.insert(country, -1);
110 }
111
112 for (auto p = this->countryList.begin(); p != this->countryList.end(); ++p) {
113 *p = index++;
114 this->ui->countryCombo->insertItem(*p, p.key());
115 }
116}
117
118void
119LocationConfigTab::paintMapCoords(double lat, double lon)

Callers 1

LocationConfigTabMethod · 0.95

Calls 5

getFirstLocationMethod · 0.80
getLastLocationMethod · 0.80
getLocationNameMethod · 0.80
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected