[Marble-commits] KDE/kdeedu/marble/src/lib
Thibaut Gridel
tgridel at free.fr
Sun Jun 6 21:26:13 CEST 2010
SVN commit 1135203 by tgridel:
gpslayer: bye bye
D AbstractLayer/AbstractLayer.cpp
D AbstractLayer/AbstractLayer.h
M +0 -2 CMakeLists.txt
M +16 -12 MarbleModel.cpp
D gps/GpsLayer.cpp
D gps/GpsLayer.h
M +0 -1 gps/PositionTracking.cpp
M +0 -1 gps/TrackSegment.cpp
--- trunk/KDE/kdeedu/marble/src/lib/CMakeLists.txt #1135202:1135203
@@ -154,12 +154,10 @@
gps/WaypointContainer.cpp
gps/TrackContainer.cpp
gps/RouteContainer.cpp
- gps/GpsLayer.cpp
gps/GpxSax.cpp
gps/GpxFile.cpp
gps/GpxFileModel.cpp
AbstractLayer/AbstractLayerInterface.cpp
- AbstractLayer/AbstractLayer.cpp
AbstractLayer/AbstractLayerContainer.cpp
AbstractLayer/AbstractLayerData.cpp
DataMigration.cpp
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp #1135202:1135203
@@ -26,7 +26,6 @@
#include "MapThemeManager.h"
#include "global.h"
#include "MarbleDebug.h"
-#include "gps/GpsLayer.h"
#include "GeoSceneDocument.h"
#include "GeoSceneFilter.h"
@@ -143,7 +142,6 @@
QItemSelectionModel *m_placemarkselectionmodel;
//Gps Stuff
- GpsLayer *m_gpsLayer;
PositionTracking *m_positionTracking;
GpxFileModel *m_gpxFileModel;
@@ -216,11 +214,7 @@
GpxFile *gpxFile = new GpxFile();
d->m_gpxFileModel->addFile(gpxFile);
d->m_positionTracking = new PositionTracking(gpxFile, this);
- d->m_gpsLayer = new GpsLayer( d->m_gpxFileModel, d->m_positionTracking );
- connect( d->m_dataFacade->fileViewModel(), SIGNAL(layoutChanged()),
- d->m_gpsLayer, SLOT(clearModel() ) );
-
d->m_layerManager = new LayerManager( d->m_dataFacade, d->m_pluginManager, this );
// FIXME: more on the spot update names and API
@@ -267,7 +261,6 @@
delete d->m_popSortModel;
delete d->m_placemarkmanager;
delete d->m_fileManager;
- delete d->m_gpsLayer;
delete d->m_mapTheme;
delete d->m_timer;
delete d->m_layerManager;
@@ -649,12 +642,23 @@
}
// Paint the Gps Layer
-// d->m_gpsLayer->setVisible( viewParams->showGps() );
- //FIXME:We might just send ViewParams instead of this bunch of parameters
- d->m_gpsLayer->paintLayer( painter,
- viewParams->canvasImage()->size(),
- viewParams );
+ painter->save();
+ QSize canvasSize = viewParams->canvasImage()->size();
+ if ( viewParams->showGps() ) {
+ QRegion temp; // useless variable
+ d->m_positionTracking->update( canvasSize, viewParams, temp );
+ d->m_positionTracking->draw( painter, canvasSize, viewParams );
+ const QVector<GpxFile*> * const allFiles = d->m_gpxFileModel->allFiles();
+ QVector<GpxFile*>::const_iterator it;
+ for( it = allFiles->constBegin();
+ it != allFiles->constEnd(); ++it ) {
+ (*it)->draw( painter, canvasSize, viewParams );
+ }
+ }
+ painter->restore();
+
+
renderPositions.clear();
renderPositions << "HOVERS_ABOVE_SURFACE" << "ATMOSPHERE"
<< "ORBIT" << "ALWAYS_ON_TOP" << "FLOAT_ITEM" << "USER_TOOLS";
--- trunk/KDE/kdeedu/marble/src/lib/gps/PositionTracking.cpp #1135202:1135203
@@ -11,7 +11,6 @@
#include "PositionTracking.h"
-#include "AbstractLayer.h"
#include "ClipPainter.h"
#include "GpxFile.h"
#include "Track.h"
--- trunk/KDE/kdeedu/marble/src/lib/gps/TrackSegment.cpp #1135202:1135203
@@ -9,7 +9,6 @@
//
#include "TrackSegment.h"
-#include "AbstractLayer/AbstractLayer.h"
#include "ClipPainter.h"
#include "MarbleDirs.h"
More information about the Marble-commits
mailing list