[Marble-devel] [PATCH 07/13] MergedLayerDecorator: remove unneeded parameters from constructor and paint().
Torsten Rahn
tackat at t-online.de
Wed Mar 31 09:38:34 CEST 2010
Yay, less Spaghetteria in that MergedLayerDecorator stuff :-)
Ship it.
On Dienstag 30 März 2010 20:32:52 Jens-Michael Hoffmann wrote:
> MergedLayerDecorator: remove unneeded parameters from constructor and
> paint().
>
> ---
> marble/src/lib/MarbleModel.cpp | 4 ++--
> marble/src/lib/MergedLayerDecorator.cpp | 5 ++---
> marble/src/lib/MergedLayerDecorator.h | 8 ++------
> 3 files changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/marble/src/lib/MarbleModel.cpp
> b/marble/src/lib/MarbleModel.cpp index 68d65ab..7420c8d 100644
> --- a/marble/src/lib/MarbleModel.cpp
> +++ b/marble/src/lib/MarbleModel.cpp
> @@ -224,7 +224,7 @@ MarbleModel::MarbleModel( QObject *parent )
> /* Assume we are dealing with the earth */
> d->m_planet = new Planet( "earth" );
> d->m_sunLocator = new SunLocator( d->m_dateTime, d->m_planet );
> - d->m_layerDecorator = new MergedLayerDecorator( d->m_tileLoader,
> d->m_sunLocator ); + d->m_layerDecorator = new MergedLayerDecorator;
>
> connect(d->m_dateTime, SIGNAL( timeChanged() ),
> d->m_sunLocator, SLOT( update() ) );
> @@ -843,7 +843,7 @@ void MarbleModel::paintTile( StackedTile* tile,
> GeoSceneTexture *textureLayer ) d->m_layerDecorator->setInfo( tile->id()
> );
> d->m_layerDecorator->setTile( tile->resultTile() );
>
> - d->m_layerDecorator->paint( "maps/" + textureLayer->sourceDir(),
> mapTheme() ); + d->m_layerDecorator->paint( "maps/" +
> textureLayer->sourceDir() ); }
>
> PluginManager* MarbleModel::pluginManager() const
> diff --git a/marble/src/lib/MergedLayerDecorator.cpp
> b/marble/src/lib/MergedLayerDecorator.cpp index a846d15..f638224 100644
> --- a/marble/src/lib/MergedLayerDecorator.cpp
> +++ b/marble/src/lib/MergedLayerDecorator.cpp
> @@ -25,15 +25,14 @@
>
> using namespace Marble;
>
> -MergedLayerDecorator::MergedLayerDecorator( StackedTileLoader * const
> tileLoader, - SunLocator*
> sunLocator ) +MergedLayerDecorator::MergedLayerDecorator()
>
> : m_tile( 0 ),
>
> m_id(),
> m_showTileId( false )
> {
> }
>
> -void MergedLayerDecorator::paint( const QString& themeId, GeoSceneDocument
> *mapTheme ) +void MergedLayerDecorator::paint( const QString& themeId )
> {
> if ( m_showTileId ) {
> paintTileId( themeId );
> diff --git a/marble/src/lib/MergedLayerDecorator.h
> b/marble/src/lib/MergedLayerDecorator.h index af046b3..ab5bf9d 100644
> --- a/marble/src/lib/MergedLayerDecorator.h
> +++ b/marble/src/lib/MergedLayerDecorator.h
> @@ -22,24 +22,20 @@
>
> class QImage;
> class QString;
> -class QUrl;
>
> namespace Marble
> {
> -class GeoSceneDocument;
> -class SunLocator;
> -class StackedTileLoader;
>
> class MergedLayerDecorator : public QObject
> {
> Q_OBJECT
>
> public:
> - MergedLayerDecorator( StackedTileLoader * const tileLoader,
> SunLocator* sunLocator ); + MergedLayerDecorator();
>
> // The Parameter themeId is only used for displaying the TileId,
> // which is a debugging feature, therefore at this point QString
> remains. - void paint( const QString& themeId, GeoSceneDocument
> *mapTheme = 0 ); + void paint( const QString& themeId );
> void paintTileId(const QString& themeId);
>
> void setShowTileId(bool show);
More information about the Marble-devel
mailing list