summaryrefslogtreecommitdiffstats
path: root/qt-ui/globe.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-17 08:14:10 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-17 08:14:10 -0300
commit4098922b553c8a412b457a3b6fabbbd936317a65 (patch)
tree0a21c3a166fe6eafd97c063fda1a761455fc5219 /qt-ui/globe.cpp
parent2f35c940261fe0f5fdb2723072553c036492e608 (diff)
downloadsubsurface-4098922b553c8a412b457a3b6fabbbd936317a65.tar.gz
Adds preliminary support for Marble Widget
Adds preliminary support for marble widget, alongside with the dive list. my idea is to let the view stay there at the left of the dive list since we got a lot of unused space and a globe is something nice to have - so you can look around where did you dived, the dives near the one that's currectly selected, and so on. I'm not using OpenStreetMaps right now, but a good thing about marble is that it is skinnable - so for instance, a dive school could present a dive lesson using subsurface with a globe from the 1600, to make it feel like 'history'. This version will only compile to Qt4. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/globe.cpp')
-rw-r--r--qt-ui/globe.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
new file mode 100644
index 000000000..770e51b02
--- /dev/null
+++ b/qt-ui/globe.cpp
@@ -0,0 +1,25 @@
+#include "globe.h"
+#include <marble/AbstractFloatItem.h>
+
+using namespace Marble;
+
+GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent)
+{
+ setMapThemeId("earth/bluemarble/bluemarble.dgml");
+ setProjection( Marble::Spherical );
+
+ // Enable the cloud cover and enable the country borders
+ setShowClouds( true );
+ setShowBorders( true );
+
+ // Hide the FloatItems: Compass and StatusBar
+ setShowOverviewMap(false);
+ setShowScaleBar(false);
+
+ Q_FOREACH( AbstractFloatItem * floatItem, floatItems() ){
+ if ( floatItem && floatItem->nameId() == "compass" ) {
+ floatItem->setPosition( QPoint( 10, 10 ) );
+ floatItem->setContentSize( QSize( 50, 50 ) );
+ }
+ }
+}