Manage the list of available location.
More...
#include <StelLocationMgr.hpp>
|
| StelLocationMgr () |
| Default constructor which loads the list of locations from the base and user location files.
|
|
| StelLocationMgr (const LocationList &locations) |
| Construct a StelLocationMgr which uses the locations given instead of loading them from the files.
|
|
void | setLocations (const LocationList &locations) |
| Replaces the loaded location list.
|
|
LocationList | getAll () const |
| Return the list of all loaded locations.
|
|
LocationMap | getAllMap () const |
| Returns a map of all loaded locations. The key is the location ID, suitable for a list view.
|
|
const StelLocation | locationFromCLI () const |
| Return the StelLocation from a CLI.
|
|
const StelLocation & | getLastResortLocation () const |
| Return a valid location when no valid one was found.
|
|
bool | canSaveUserLocation (const StelLocation &loc) const |
| Get whether a location can be permanently added to the list of user locations The main constraint is that the small string must be unique.
|
|
bool | saveUserLocation (const StelLocation &loc) |
| Add permanently a location to the list of user locations It is later identified by its small string.
|
|
bool | canDeleteUserLocation (const QString &id) const |
| Get whether a location can be deleted from the list of user locations If the location comes from the base read only list, it cannot be deleted. More...
|
|
bool | deleteUserLocation (const QString &id) |
| Delete permanently the given location from the list of user locations If the location comes from the base read only list, it cannot be deleted and false is returned. More...
|
|
LocationMap | pickLocationsNearby (const QString planetName, const float longitude, const float latitude, const float radiusDegrees) |
| Find list of locations within. More...
|
|
LocationMap | pickLocationsInCountry (const QString country) |
| Find list of locations in a particular country only.
|
|
bool StelLocationMgr::canDeleteUserLocation |
( |
const QString & |
id | ) |
const |
bool StelLocationMgr::deleteUserLocation |
( |
const QString & |
id | ) |
|
void StelLocationMgr::locationListChanged |
( |
| ) |
|
|
signal |
when the user added or removed locations
LocationMap StelLocationMgr::pickLocationsNearby |
( |
const QString |
planetName, |
|
|
const float |
longitude, |
|
|
const float |
latitude, |
|
|
const float |
radiusDegrees |
|
) |
| |
- Parameters
-
radiusDegrees | of selected (usually screen-clicked) coordinates. |
static QString StelLocationMgr::sanitizeTimezoneStringForLocationDB |
( |
QString |
tzString | ) |
|
|
staticslot |
If timezone name starts with "UTC", always return unchanged. This is required to store timezone names exactly as we know them, and not mix ours and corrent-IANA spelling flavour.
static QString StelLocationMgr::sanitizeTimezoneStringFromLocationDB |
( |
QString |
dbString | ) |
|
|
staticslot |
That list may be updated by OS anytime and is known to differ between OSes. Some spellings may be different, or in some cases some names get simply translated to "UTC+HH:MM" style. The empty string gets translated to "UTC".