![]() |
Stellarium 0.13.3
|
Manage the list of available location. More...
#include <StelLocationMgr.hpp>
Public Member Functions | |
| StelLocationMgr () | |
| Default constructor. More... | |
| ~StelLocationMgr () | |
| Destructor. More... | |
| QStringListModel * | getModelAll () |
| Return the model containing all the city. More... | |
| QStringListModel * | getModelPicked () |
| Return the model containing picked (nearby) cities or cities from a single country, or other preselection. More... | |
| QList< StelLocation > | getAll () const |
| Return the list of all loaded locations. More... | |
| const StelLocation | locationForString (const QString &s) const |
| Return the StelLocation for a given string Can match location name, or coordinates. More... | |
| const StelLocation | locationFromCLI () const |
| Return the StelLocation from a CLI. More... | |
| const StelLocation & | getLastResortLocation () const |
| Return a valid location when no valid one was found. More... | |
| 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. More... | |
| bool | saveUserLocation (const StelLocation &loc) |
| Add permanently a location to the list of user locations It is later identified by its small string. More... | |
| 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... | |
| void | locationFromIP () |
| Find location via online lookup of IP address. More... | |
getModelPicked(). | |
Preselect list of locations in a particular country only. The list can be retrieved by calling | |
| void | pickLocationsNearby (const QString planetName, const float longitude, const float latitude, const float radiusDegrees) |
| void | pickLocationsInCountry (const QString country) |
| void | changeLocationFromNetworkLookup () |
| Process answer from online lookup of IP address. More... | |
Manage the list of available location.
Definition at line 32 of file StelLocationMgr.hpp.
| StelLocationMgr::StelLocationMgr | ( | ) |
Default constructor.
| StelLocationMgr::~StelLocationMgr | ( | ) |
Destructor.
| bool StelLocationMgr::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.
| id | the location ID |
| bool StelLocationMgr::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.
|
slot |
Process answer from online lookup of IP address.
| bool StelLocationMgr::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.
| id | the location ID |
|
inline |
Return the list of all loaded locations.
Definition at line 48 of file StelLocationMgr.hpp.
|
inline |
Return a valid location when no valid one was found.
Definition at line 58 of file StelLocationMgr.hpp.
|
inline |
Return the model containing all the city.
Definition at line 43 of file StelLocationMgr.hpp.
|
inline |
Return the model containing picked (nearby) cities or cities from a single country, or other preselection.
Definition at line 45 of file StelLocationMgr.hpp.
| const StelLocation StelLocationMgr::locationForString | ( | const QString & | s | ) | const |
Return the StelLocation for a given string Can match location name, or coordinates.
| const StelLocation StelLocationMgr::locationFromCLI | ( | ) | const |
Return the StelLocation from a CLI.
| void StelLocationMgr::locationFromIP | ( | ) |
Find location via online lookup of IP address.
| bool StelLocationMgr::saveUserLocation | ( | const StelLocation & | loc | ) |
Add permanently a location to the list of user locations It is later identified by its small string.
1.8.7