summaryrefslogtreecommitdiffstats
path: root/qt-ui/globe.h
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-03-26 23:08:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-03-27 10:40:06 -0700
commit770bf9afba18a2d50ead56c0068dc07ed8cb63a1 (patch)
tree78dfc1706dad2affd6957cf974914745c2f172a8 /qt-ui/globe.h
parent027ffc41bb2e50ccb6a1b812a225773fb8227fee (diff)
downloadsubsurface-770bf9afba18a2d50ead56c0068dc07ed8cb63a1.tar.gz
Introduce NO_MARBLE define, make GlobeGPS a dummy
Some users have requested a way to build subsurface without marble. This hides all traces in the ui and creates a GlobeGPS-dummy thats just a QLabel saying that marble is disabled, in case its shown somehow. The dummy is there so we can just ignore the fact that marble is disabled in the rest of the code. Fixes #394 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/globe.h')
-rw-r--r--qt-ui/globe.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/qt-ui/globe.h b/qt-ui/globe.h
index 80d9613dd..f5a1e4053 100644
--- a/qt-ui/globe.h
+++ b/qt-ui/globe.h
@@ -1,5 +1,6 @@
#ifndef GLOBE_H
#define GLOBE_H
+#ifndef NO_MARBLE
#include <marble/MarbleWidget.h>
#include <marble/GeoDataCoordinates.h>
@@ -41,4 +42,21 @@ slots:
void prepareForGetDiveCoordinates();
};
+#else // NO_MARBLE
+/* Dummy widget for when we don't have MarbleWidget */
+#include <QLabel>
+
+class GlobeGPS : public QLabel {
+ Q_OBJECT
+public:
+ GlobeGPS(QWidget *parent);
+ void reload();
+ void repopulateLabels();
+ void centerOn(struct dive* dive);
+ bool eventFilter(QObject*, QEvent*);
+public slots:
+ void prepareForGetDiveCoordinates();
+};
+
+#endif // NO_MARBLE
#endif // GLOBE_H