[Marble-commits] KDE/kdeedu/marble/src
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Thu Aug 19 09:33:25 CEST 2010
SVN commit 1165378 by beschow:
use forwarders of MarbleWidget that forward to methods in MarbleMap directly
M +2 -2 lib/MarbleWidgetInputHandler.cpp
M +3 -3 lib/routing/AdjustNavigation.cpp
M +2 -3 lib/routing/RoutingWidget.cpp
M +4 -4 marble_part.cpp
M +13 -13 plugins/render/navigation/NavigationFloatItem.cpp
M +1 -2 plugins/render/progress/ProgressFloatItem.cpp
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidgetInputHandler.cpp #1165377:1165378
@@ -280,7 +280,7 @@
qreal destLat;
qreal destLon;
- qreal distance = marbleWidget->map()->distance();
+ qreal distance = marbleWidget->distance();
marbleWidget->geoCoordinates( pos.x(), pos.y(), destLon, destLat, GeoDataCoordinates::Radian );
GeoDataLookAt lookAt;
@@ -740,7 +740,7 @@
marbleWidget->setViewContext( Animation );
int steps = wheelevt->delta() / 3;
- qreal zoom = marbleWidget->map()->zoom();
+ qreal zoom = marbleWidget->zoom();
qreal target = MarbleWidgetInputHandler::d->m_wheelZoomTargetDistance;
if ( marbleWidget->animationsEnabled() && target > 0.0 ) {
// Do not use intermediate (interpolated) distance values caused by animations
--- trunk/KDE/kdeedu/marble/src/lib/routing/AdjustNavigation.cpp #1165377:1165378
@@ -74,7 +74,7 @@
m_recenterMode = recenterMode;
emit recenterModeChanged( recenterMode );
- PositionTracking * tracking = m_widget->map()->model()->positionTracking();
+ PositionTracking * tracking = m_widget->model()->positionTracking();
if( recenterMode ) {
m_tracking = tracking;
QObject::connect( tracking, SIGNAL( gpsLocation( GeoDataCoordinates, qreal ) ),
@@ -125,7 +125,7 @@
m_adjustZoom = autoZoom;
emit autoZoomToggled( autoZoom );
- PositionTracking * tracking = m_widget->map()->model()->positionTracking();
+ PositionTracking * tracking = m_widget->model()->positionTracking();
if( autoZoom ) {
m_tracking = tracking;
QObject::connect( tracking, SIGNAL( gpsLocation( GeoDataCoordinates, qreal ) ),
@@ -307,7 +307,7 @@
void AdjustNavigation::adjustZoom( GeoDataCoordinates currentPosition, GeoDataCoordinates destination )
{
qreal greatCircleDistance = distanceSphere( currentPosition, destination );
- qreal radius = m_widget->map()->model()->planetRadius();
+ qreal radius = m_widget->model()->planetRadius();
qreal distance = greatCircleDistance * radius;
if( m_gpsSpeed != 0 ) {
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingWidget.cpp #1165377:1165378
@@ -11,7 +11,6 @@
#include "RoutingWidget.h"
#include "GeoDataLineString.h"
-#include "MarbleMap.h"
#include "MarbleModel.h"
#include "MarblePlacemarkModel.h"
#include "MarbleWidget.h"
@@ -150,13 +149,13 @@
d->m_routeSkeleton = new RouteSkeleton( this );
//d->m_routingManager = new RoutingManager( d->m_widget, this );
- d->m_routingManager = d->m_widget->map()->model()->routingManager();
+ d->m_routingManager = d->m_widget->model()->routingManager();
d->m_ui.routeComboBox->setModel( d->m_routingManager->alternativeRoutesModel() );
d->m_routingLayer = new RoutingLayer( d->m_widget, this );
d->m_routingLayer->setRouteSkeleton( d->m_routeSkeleton );
d->m_routingLayer->synchronizeAlternativeRoutesWith( d->m_routingManager->alternativeRoutesModel(), d->m_ui.routeComboBox );
- d->m_widget->map()->model()->addLayer( d->m_routingLayer );
+ d->m_widget->model()->addLayer( d->m_routingLayer );
connect( d->m_routingLayer, SIGNAL( routeDirty() ),
d->m_routingManager, SLOT( updateRoute() ) );
--- trunk/KDE/kdeedu/marble/src/marble_part.cpp #1165377:1165378
@@ -1008,7 +1008,7 @@
void MarblePart::updateTileZoomLevel()
{
const int tileZoomLevel =
- m_controlView->marbleWidget()->map()->model()->tileZoomLevel();
+ m_controlView->marbleWidget()->model()->tileZoomLevel();
if ( tileZoomLevel == -1 )
m_tileZoomLevel = NOT_AVAILABLE;
else {
@@ -1093,7 +1093,7 @@
statusBar->addPermanentWidget( m_downloadProgressBar );
HttpDownloadManager * const downloadManager =
- m_controlView->marbleWidget()->map()->model()->downloadManager();
+ m_controlView->marbleWidget()->model()->downloadManager();
Q_ASSERT( downloadManager );
connect( downloadManager, SIGNAL( jobAdded() ), SLOT( downloadJobAdded() ) );
connect( downloadManager, SIGNAL( jobRemoved() ), SLOT( downloadJobRemoved() ) );
@@ -1163,7 +1163,7 @@
void MarblePart::showDownloadRegionDialog()
{
- MarbleModel * const model = m_controlView->marbleWidget()->map()->model();
+ MarbleModel * const model = m_controlView->marbleWidget()->model();
if ( !m_downloadRegionDialog ) {
m_downloadRegionDialog = new DownloadRegionDialog( model, widget() );
// it might be tempting to move the connects to DownloadRegionDialog's "accepted" and
@@ -1196,7 +1196,7 @@
QString const sourceDir = mapThemeId.left( mapThemeId.lastIndexOf( '/' ));
kDebug() << "downloadRegion mapThemeId:" << mapThemeId << sourceDir;
QVector<TileCoordsPyramid> const pyramid = m_downloadRegionDialog->region();
- m_controlView->marbleWidget()->map()->model()->downloadRegion( sourceDir, pyramid );
+ m_controlView->marbleWidget()->model()->downloadRegion( sourceDir, pyramid );
}
void MarblePart::showStatusBarContextMenu( const QPoint& pos )
--- trunk/KDE/kdeedu/marble/src/plugins/render/navigation/NavigationFloatItem.cpp #1165377:1165378
@@ -153,8 +153,8 @@
if ( m_marbleWidget != widget ) {
// Delayed initialization
m_marbleWidget = widget;
- int minZoom = m_marbleWidget->map()->minimumZoom();
- int maxZoom = m_marbleWidget->map()->maximumZoom();
+ int minZoom = m_marbleWidget->minimumZoom();
+ int maxZoom = m_marbleWidget->maximumZoom();
//m_navigationWidget->zoomSlider->setRange(minZoom, maxZoom);
if( m_profiles & MarbleGlobal::SmallScreen ) {
@@ -168,7 +168,7 @@
else {
m_navigationWidget->zoomSlider->setMinimum(minZoom);
m_navigationWidget->zoomSlider->setMaximum(maxZoom);
- m_navigationWidget->zoomSlider->setValue(m_marbleWidget->map()->zoom());
+ m_navigationWidget->zoomSlider->setValue(m_marbleWidget->zoom());
m_navigationWidget->zoomSlider->setTickInterval((maxZoom - minZoom) / 15);
connect( m_navigationWidget->zoomInButton, SIGNAL( clicked() ),
@@ -189,12 +189,12 @@
m_marbleWidget, SLOT( goHome() ) );
}
- connect( m_marbleWidget->map(), SIGNAL( zoomChanged(int) ),
+ connect( m_marbleWidget, SIGNAL( zoomChanged(int) ),
this, SLOT( setZoomSliderValue( int ) ) );
connect( m_marbleWidget, SIGNAL( themeChanged( QString ) ),
this, SLOT( selectTheme( QString ) ) );
- updateButtons( m_marbleWidget->map()->zoom() );
+ updateButtons( m_marbleWidget->zoom() );
}
return AbstractFloatItem::eventFilter(object, e);
@@ -219,10 +219,10 @@
return;
}
- disconnect( m_marbleWidget->map(), SIGNAL( zoomChanged(int) ),
+ disconnect( m_marbleWidget, SIGNAL( zoomChanged(int) ),
this, SLOT( setZoomSliderValue( int ) ) );
m_marbleWidget->zoomView( level );
- connect( m_marbleWidget->map(), SIGNAL( zoomChanged(int) ),
+ connect( m_marbleWidget, SIGNAL( zoomChanged(int) ),
this, SLOT( setZoomSliderValue( int ) ) );
}
@@ -232,13 +232,13 @@
if ( m_marbleWidget ) {
if( m_profiles & MarbleGlobal::SmallScreen ) {
- updateButtons( m_marbleWidget->map()->zoom() );
+ updateButtons( m_marbleWidget->zoom() );
}
else {
- int minZoom = m_marbleWidget->map()->minimumZoom();
- int maxZoom = m_marbleWidget->map()->maximumZoom();
+ int minZoom = m_marbleWidget->minimumZoom();
+ int maxZoom = m_marbleWidget->maximumZoom();
m_navigationWidget->zoomSlider->setRange( minZoom, maxZoom );
- m_navigationWidget->zoomSlider->setValue( m_marbleWidget->map()->zoom() );
+ m_navigationWidget->zoomSlider->setValue( m_marbleWidget->zoom() );
updateButtons( m_navigationWidget->zoomSlider->value() );
}
}
@@ -276,8 +276,8 @@
if( m_profiles & MarbleGlobal::SmallScreen ) {
if ( m_marbleWidget ) {
- minZoom = m_marbleWidget->map()->minimumZoom();
- maxZoom = m_marbleWidget->map()->maximumZoom();
+ minZoom = m_marbleWidget->minimumZoom();
+ maxZoom = m_marbleWidget->maximumZoom();
}
zoomInButton = m_navigationWidgetSmall->zoomInButton;
--- trunk/KDE/kdeedu/marble/src/plugins/render/progress/ProgressFloatItem.cpp #1165377:1165378
@@ -12,7 +12,6 @@
#include "MarbleDebug.h"
#include "MarbleDirs.h"
-#include "MarbleMap.h"
#include "MarbleModel.h"
#include "MarbleWidget.h"
#include "GeoPainter.h"
@@ -179,7 +178,7 @@
MarbleWidget *widget = dynamic_cast<MarbleWidget*> (object);
if ( !m_marbleWidget && widget ) {
- HttpDownloadManager* manager = widget->map()->model()->downloadManager();
+ HttpDownloadManager* manager = widget->model()->downloadManager();
if ( manager ) {
m_marbleWidget = widget;
connect( manager, SIGNAL( jobAdded() ), this, SLOT( addProgressItem() ) );
More information about the Marble-commits
mailing list