summaryrefslogtreecommitdiffstats
path: root/subsurface-core/gpslocation.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-02 14:30:47 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-02 14:30:47 -0800
commit962341ae9f781e10a6276b9f7d81d9da72bd90f6 (patch)
tree2ddacc7c572902d04620e5851edd0d5dcbbdbc33 /subsurface-core/gpslocation.h
parent1bfcf5c0f820633e7f9387722438370f0a3a5a48 (diff)
downloadsubsurface-962341ae9f781e10a6276b9f7d81d9da72bd90f6.tar.gz
Add instance method for GpsLocation
This way we can call members from different parts of the code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/gpslocation.h')
-rw-r--r--subsurface-core/gpslocation.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/subsurface-core/gpslocation.h b/subsurface-core/gpslocation.h
index e0e825cb1..8fb3bb947 100644
--- a/subsurface-core/gpslocation.h
+++ b/subsurface-core/gpslocation.h
@@ -14,6 +14,8 @@ class GpsLocation : QObject
Q_OBJECT
public:
GpsLocation(void (*showMsgCB)(const char *msg), QObject *parent);
+ ~GpsLocation();
+ static GpsLocation *instance();
void applyLocations();
int getGpsNum() const;
QString getUserid(QString user, QString passwd);
@@ -27,8 +29,7 @@ private:
QNetworkReply *reply;
QString userAgent;
void (*showMessageCB)(const char *msg);
-
-signals:
+ static GpsLocation *m_Instance;
public slots:
void serviceEnable(bool toggle);