[Marble-commits] KDE/kdeedu/marble/src/lib
Thibaut Gridel
tgridel at free.fr
Sat Jan 23 09:06:08 CET 2010
SVN commit 1078919 by tgridel:
LayerManager: use MarbleModel's PluginManager
M +9 -6 LayerManager.cpp
M +4 -1 LayerManager.h
M +1 -1 MarbleModel.cpp
--- trunk/KDE/kdeedu/marble/src/lib/LayerManager.cpp #1078918:1078919
@@ -35,27 +35,30 @@
class LayerManagerPrivate
{
public:
- LayerManagerPrivate( MarbleDataFacade* dataFacade )
+ LayerManagerPrivate( MarbleDataFacade* dataFacade,
+ PluginManager* pluginManager )
: m_mapTheme(0),
- m_dataFacade( dataFacade )
+ m_dataFacade( dataFacade ),
+ m_pluginManager( pluginManager )
{
+ m_renderPlugins = pluginManager->createRenderPlugins();
}
GeoSceneDocument *m_mapTheme;
MarbleDataFacade *m_dataFacade;
+ PluginManager *m_pluginManager;
QList<RenderPlugin *> m_renderPlugins;
QList<AbstractFloatItem *> m_floatItems;
QList<AbstractDataPlugin *> m_dataPlugins;
};
-LayerManager::LayerManager( MarbleDataFacade* dataFacade, QObject *parent )
+LayerManager::LayerManager( MarbleDataFacade* dataFacade,
+ PluginManager* pluginManager, QObject *parent )
: QObject( parent ),
- d( new LayerManagerPrivate( dataFacade) )
+ d( new LayerManagerPrivate( dataFacade, pluginManager) )
{
- PluginManager pm;
- d->m_renderPlugins = pm.createRenderPlugins();
// get float items and data plugins
foreach( RenderPlugin * renderPlugin, d->m_renderPlugins ) {
--- trunk/KDE/kdeedu/marble/src/lib/LayerManager.h #1078918:1078919
@@ -36,6 +36,7 @@
class AbstractFloatItem;
class AbstractDataPlugin;
class MarbleDataFacade;
+class PluginManager;
/**
* @short The class that handles Marble's DGML layers.
@@ -47,7 +48,9 @@
Q_OBJECT
public:
- explicit LayerManager( MarbleDataFacade*, QObject *parent = 0);
+ explicit LayerManager( MarbleDataFacade* dataFacade,
+ PluginManager* pluginManager,
+ QObject *parent = 0);
~LayerManager();
void renderLayers( GeoPainter *painter, ViewParams *viewParams, const QStringList& renderPositions );
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp #1078918:1078919
@@ -200,7 +200,7 @@
connect( d->m_dataFacade->fileViewModel(), SIGNAL(layoutChanged()),
d->m_gpsLayer, SLOT(clearModel() ) );
- d->m_layerManager = new LayerManager( d->m_dataFacade, this );
+ d->m_layerManager = new LayerManager( d->m_dataFacade, d->m_pluginManager, this );
// FIXME: more on the spot update names and API
connect ( d->m_layerManager, SIGNAL( floatItemsChanged() ),
More information about the Marble-commits
mailing list