5 #include "gpslocation.h"
12 class Locations: public QObject
17 static Locations *GetInstance();
18 //static void destroyLocations();
20 bool addEditLocation(Location *location);
21 bool removeLocation(Location *location);
23 bool increaseLocationIndex(const QString &label);
24 bool lowerLocationIndex(const QString &label);
26 Location *getLocation(const QString &label) const;
27 Location *getLocation(const int&) const;
31 //const QHash<QString, Location *>& getLocations() const;
34 void locationsChanged();
39 Locations(const Locations&);
40 void operator=(const Locations&);
42 void restoreLocations();
43 void saveLocation(Location *location);
44 bool findLabel(const int &index, QString &label) const;
45 void changeIndex(const QString &label, const int &index, bool signal = true);
47 QHash<QString, Location*> m_locationStorage;
48 QList<QString> m_indexStorage;
51 static Locations *m_instance;
55 GpsLocation *getGpsLocation() const;
57 GpsLocation* m_gpsLocation;