summaryrefslogtreecommitdiffstats
path: root/qt-ui/globe.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2015-07-30 21:51:38 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-31 10:28:17 -0700
commit7efa924067942e6ad32894454e90bf7c5c99a5ae (patch)
treee2b55d2ed2811fa54fd3ddee7315f7e8e15b4d4f /qt-ui/globe.h
parent9130ff8a97ea73e92dccd68f8107f441cb0a3f7e (diff)
downloadsubsurface-7efa924067942e6ad32894454e90bf7c5c99a5ae.tar.gz
Transform GlobeGPS in a static instance() class
This is needed to start easing the transition from the completely wrong and bogus MainWindow::instance()->globe() calls. this is still wrong, but with it I removed one level of indirection. I did that now because I wanted to not taint the location management when I use it to deal with the globe. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/globe.h')
-rw-r--r--qt-ui/globe.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/globe.h b/qt-ui/globe.h
index e8be53b5e..a8cb89440 100644
--- a/qt-ui/globe.h
+++ b/qt-ui/globe.h
@@ -21,7 +21,7 @@ class GlobeGPS : public MarbleWidget {
Q_OBJECT
public:
using MarbleWidget::centerOn;
- GlobeGPS(QWidget *parent = 0);
+ static GlobeGPS *instance();
void reload();
bool eventFilter(QObject *, QEvent *);
@@ -38,6 +38,7 @@ private:
bool needResetZoom;
bool editingDiveLocation;
bool doubleClick;
+ GlobeGPS(QWidget *parent = 0);
signals:
void coordinatesChanged();