StelLocationMgr::StelLocationMgr() { QSettings* conf = StelApp::getInstance().getSettings(); // The line below allows to re-generate the location file, you still need to gunzip it manually afterward. // generateBinaryLocationFile("data/base_locations.txt", false, "data/base_locations.bin"); locations = loadCitiesBin("data/base_locations.bin.gz"); locations.unite(loadCities("data/user_locations.txt", true)); // Init to Paris France because it's the center of the world. lastResortLocation = locationForString(conf->value("init_location/last_location", "Paris, France").toString()); }
StelLocationMgr::StelLocationMgr() { // The line below allows to re-generate the location file, you still need to gunzip it manually afterward. // generateBinaryLocationFile("data/base_locations.txt", false, "data/base_locations.bin"); locations = loadCitiesBin("data/base_locations.bin.gz"); locations.unite(loadCities("data/user_locations.txt", true)); modelAllLocation = new QStringListModel(this); modelAllLocation->setStringList(locations.keys()); // Init to Paris France because it's the center of the world. lastResortLocation = locationForSmallString("Paris, France"); }