[Marble-commits] KDE/kdeedu/marble/src/lib
Thibaut Gridel
tgridel at free.fr
Sat Jan 23 09:06:19 CET 2010
SVN commit 1078920 by tgridel:
PositionTracking: use MarbleModel's PluginManager
M +1 -1 MarbleModel.cpp
M +3 -2 gps/GpsLayer.cpp
M +3 -1 gps/GpsLayer.h
M +2 -2 gps/PositionTracking.cpp
M +2 -0 gps/PositionTracking.h
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp #1078919:1078920
@@ -195,7 +195,7 @@
this, SIGNAL( modelChanged() ) );
d->m_gpxFileModel = new GpxFileModel( this );
- d->m_gpsLayer = new GpsLayer( d->m_gpxFileModel );
+ d->m_gpsLayer = new GpsLayer( d->m_gpxFileModel, d->m_pluginManager );
connect( d->m_dataFacade->fileViewModel(), SIGNAL(layoutChanged()),
d->m_gpsLayer, SLOT(clearModel() ) );
--- trunk/KDE/kdeedu/marble/src/lib/gps/GpsLayer.cpp #1078919:1078920
@@ -22,7 +22,8 @@
using namespace Marble;
-GpsLayer::GpsLayer( GpxFileModel *fileModel, QObject *parent )
+GpsLayer::GpsLayer( GpxFileModel *fileModel,
+ PluginManager *pluginManager, QObject *parent )
:AbstractLayer( parent )
{
m_currentPosition = new Waypoint( 0,0 );
@@ -37,7 +38,7 @@
// m_gpsTrack = new Track();
m_currentGpx = new GpxFile();
m_fileModel->addFile( m_currentGpx );
- m_tracking = new PositionTracking( m_currentGpx, this );
+ m_tracking = new PositionTracking( m_currentGpx, pluginManager, this );
}
--- trunk/KDE/kdeedu/marble/src/lib/gps/GpsLayer.h #1078919:1078920
@@ -22,6 +22,7 @@
class PositionTracking;
class GpxFile;
class GpxFileModel;
+class PluginManager;
class Track;
class Waypoint;
@@ -29,7 +30,8 @@
{
public:
- explicit GpsLayer( GpxFileModel *fileModel, QObject *parent =0 );
+ explicit GpsLayer( GpxFileModel *fileModel,
+ PluginManager *pluginManager, QObject *parent =0 );
~GpsLayer();
virtual void paintLayer( ClipPainter *painter,
const QSize &canvasSize,
--- trunk/KDE/kdeedu/marble/src/lib/gps/PositionTracking.cpp #1078919:1078920
@@ -32,6 +32,7 @@
using namespace Marble;
PositionTracking::PositionTracking( GpxFile *currentGpx,
+ PluginManager *pluginManager,
QObject *parent )
: QObject( parent )
{
@@ -44,8 +45,7 @@
m_gpsTrackSeg = 0;
m_updateDelay = 0;
- PluginManager pluginManager;
- QList<PositionProviderPlugin *> plugins = pluginManager.createPositionProviderPlugins();
+ QList<PositionProviderPlugin *> plugins = pluginManager->createPositionProviderPlugins();
if ( !plugins.isEmpty() ) {
// FIXME: not just take the first plugin, but use some configuration setting
// take the first plugin and delete the rest
--- trunk/KDE/kdeedu/marble/src/lib/gps/PositionTracking.h #1078919:1078920
@@ -31,6 +31,7 @@
class ViewParams;
class Waypoint;
class GeoDataCoordinates;
+class PluginManager;
class PositionProviderPlugin;
class PositionTracking : public QObject
@@ -40,6 +41,7 @@
public:
explicit PositionTracking( GpxFile *currentGpx,
+ PluginManager *pluginManager,
QObject *parent = 0 );
~PositionTracking();
More information about the Marble-commits
mailing list