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>
26 lines
664 B
C++
26 lines
664 B
C++
#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 ) );
|
|
}
|
|
}
|
|
}
|