![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
#include <StelLocationMgr.hpp>
Public Member Functions | |
StelLocationMgr () | |
~StelLocationMgr () | |
QStringListModel * | getModelAll () |
QList< StelLocation > | getAll () const |
const StelLocation | locationForSmallString (const QString &s) const |
bool | canSaveUserLocation (const StelLocation &loc) const |
bool | saveUserLocation (const StelLocation &loc) |
bool | canDeleteUserLocation (const QString &id) const |
bool | deleteUserLocation (const QString &id) |
StelLocationMgr::StelLocationMgr | ( | ) |
Default constructor.
StelLocationMgr::~StelLocationMgr | ( | ) |
Destructor.
QStringListModel* StelLocationMgr::getModelAll | ( | ) | [inline] |
Return the model containing all the city.
QList<StelLocation> StelLocationMgr::getAll | ( | ) | const [inline] |
Return the list of all loaded locations.
const StelLocation StelLocationMgr::locationForSmallString | ( | const QString & | s | ) | const |
Return the StelLocation for the given row (match modelAllLocation index row).
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::saveUserLocation | ( | const StelLocation & | loc | ) |
Add permanently a location to the list of user locations It is later identified by its small string.
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::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 |