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>
This commit is contained in:
Tomaz Canabrava 2013-05-17 08:14:10 -03:00
parent 2f35c94026
commit 4098922b55
5 changed files with 95 additions and 35 deletions

25
qt-ui/globe.cpp Normal file
View file

@ -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 ) );
}
}
}