StelLocationMgr Class Reference
Manage the list of available location.
More...
#include <StelLocationMgr.hpp>
List of all members.
Public Member Functions |
| | StelLocationMgr () |
| | Default constructor.
|
| | ~StelLocationMgr () |
| | Destructor.
|
| QStringListModel * | getModelAll () |
| | Return the model containing all the city.
|
| QList< StelLocation > | getAll () const |
| | Return the list of all loaded locations.
|
| const StelLocation | locationForString (const QString &s, bool *ok=NULL) const |
| | Return the StelLocation for a given string Can match location name, or coordinates.
|
| const StelLocation | locationForSmallString (const QString &s, bool *ok=NULL) const |
| | Return the StelLocation for the given row (match modelAllLocation index row).
|
| 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.
|
| 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.
|
Detailed Description
Manage the list of available location.
Constructor & Destructor Documentation
| StelLocationMgr::StelLocationMgr |
( |
|
) |
|
| StelLocationMgr::~StelLocationMgr |
( |
|
) |
|
Member Function Documentation
| 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.
- Parameters:
-
| 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.
| 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.
- Parameters:
-
| QList<StelLocation> StelLocationMgr::getAll |
( |
|
) |
const [inline] |
Return the list of all loaded locations.
| const StelLocation& StelLocationMgr::getLastResortLocation |
( |
|
) |
const [inline] |
Return a valid location when no valid one was found.
| QStringListModel* StelLocationMgr::getModelAll |
( |
|
) |
[inline] |
Return the model containing all the city.
| const StelLocation StelLocationMgr::locationForSmallString |
( |
const QString & |
s, |
|
|
bool * |
ok = NULL | |
|
) |
| | const |
Return the StelLocation for the given row (match modelAllLocation index row).
| const StelLocation StelLocationMgr::locationForString |
( |
const QString & |
s, |
|
|
bool * |
ok = NULL | |
|
) |
| | const |
Return the StelLocation for a given string Can match location name, or coordinates.
| bool StelLocationMgr::saveUserLocation |
( |
const StelLocation & |
loc |
) |
|
Add permanently a location to the list of user locations It is later identified by its small string.