diff options
-rw-r--r-- | qt-ui/globe.cpp | 6 | ||||
-rw-r--r-- | qt-ui/globe.h | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index 4f40e22ec..aceeed9ab 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -390,6 +390,12 @@ void GlobeGPS::centerOnIndex(const QModelIndex& idx) } #else +GlobeGPS *GlobeGPS::instance() +{ + static GlobeGPS *self = new GlobeGPS(); + return self; +} + GlobeGPS::GlobeGPS(QWidget *parent) { setText("MARBLE DISABLED AT BUILD TIME"); diff --git a/qt-ui/globe.h b/qt-ui/globe.h index a8cb89440..8cc1265e4 100644 --- a/qt-ui/globe.h +++ b/qt-ui/globe.h @@ -63,7 +63,8 @@ slots: class GlobeGPS : public QLabel { Q_OBJECT public: - GlobeGPS(QWidget *parent); + GlobeGPS(QWidget *parent = 0); + static GlobeGPS *instance(); void reload(); void repopulateLabels(); void centerOnDiveSite(uint32_t uuid); |