X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Flocations.h;fp=src%2Flocations.h;h=fa74faac6c745c308bce044e11da60186e473ca5;hb=15842000c65c6c7529d0fe35e13253adb4293afd;hp=0000000000000000000000000000000000000000;hpb=5789808b3e0c9a6a1d779270ecfbf0854f4d1b1e;p=ptas diff --git a/src/locations.h b/src/locations.h new file mode 100644 index 0000000..fa74faa --- /dev/null +++ b/src/locations.h @@ -0,0 +1,33 @@ +#ifndef LOCATIONS_H +#define LOCATIONS_H + +#include "location.h" + +#include +#include +#include + +class Locations: public QObject +{ + Q_OBJECT + +public: + Locations(); + ~Locations(); + + static Locations *instance(); + bool addLocation( Location *location ); + + Location *location( const QString &label ); + +public Q_SLOTS: + void saveLocation(); + +private: + void restoreLocations(); + static QHash locationHash; + static bool initialised; + + void saveLocation( Location *location ); +}; +#endif // LOCATIONS_H