[Marble-commits] KDE/kdeedu/marble/src/lib/routing
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Thu Sep 30 23:25:41 CEST 2010
SVN commit 1181391 by beschow:
free RoutingInputWidget from MarbleMap
* makes it source-compatible to OpenGL mode
M +7 -7 RoutingInputWidget.cpp
M +2 -2 RoutingInputWidget.h
M +1 -1 RoutingWidget.cpp
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingInputWidget.cpp #1181390:1181391
@@ -17,7 +17,7 @@
#include "TinyWebBrowser.h"
#include "BookmarkManager.h"
#include "MarbleModel.h"
-#include "MarbleMap.h"
+#include "MarbleWidget.h"
#include "routing/RoutingManager.h"
#include "GeoDataFolder.h"
#include "PositionTracking.h"
@@ -42,7 +42,7 @@
public:
MarbleModel* m_marbleModel;
- MarbleMap* m_marbleMap;
+ MarbleWidget* m_marbleWidget;
RoutingLineEdit *m_lineEdit;
@@ -75,7 +75,7 @@
QAction* m_centerAction;
/** Constructor */
- RoutingInputWidgetPrivate( MarbleMap* map, int index, QWidget *parent );
+ RoutingInputWidgetPrivate( MarbleWidget* widget, int index, QWidget *parent );
/** Initiate reverse geocoding request to download address */
void adjustText();
@@ -87,8 +87,8 @@
void createBookmarkActions( QMenu* menu, GeoDataFolder* bookmarksFolder, QObject *parent );
};
-RoutingInputWidgetPrivate::RoutingInputWidgetPrivate( MarbleMap* map, int index, QWidget *parent ) :
- m_marbleModel( map->model() ), m_marbleMap( map ), m_lineEdit( 0 ),
+RoutingInputWidgetPrivate::RoutingInputWidgetPrivate( MarbleWidget* widget, int index, QWidget *parent ) :
+ m_marbleModel( widget->model() ), m_marbleWidget( widget ), m_lineEdit( 0 ),
m_runnerManager( new MarbleRunnerManager( m_marbleModel->pluginManager(), parent ) ),
m_placemarkModel( 0 ), m_route( m_marbleModel->routingManager()->routeRequest() ), m_index( index ),
m_manager( new QNetworkAccessManager( parent ) ), m_currentFrame( 0 ),
@@ -173,8 +173,8 @@
}
}
-RoutingInputWidget::RoutingInputWidget( MarbleMap* map, int index, QWidget *parent ) :
- QWidget( parent ), d( new RoutingInputWidgetPrivate( map, index, this ) )
+RoutingInputWidget::RoutingInputWidget( MarbleWidget* widget, int index, QWidget *parent ) :
+ QWidget( parent ), d( new RoutingInputWidgetPrivate( widget, index, this ) )
{
QHBoxLayout *layout = new QHBoxLayout( this );
layout->setSpacing( 0 );
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingInputWidget.h #1181390:1181391
@@ -26,7 +26,7 @@
class MarblePlacemarkModel;
class RouteRequest;
class PluginManager;
-class MarbleMap;
+class MarbleWidget;
/**
* Combines a line edit for input and a couple of buttons to let
@@ -41,7 +41,7 @@
public:
/** Constructor */
- explicit RoutingInputWidget( MarbleMap* map, int index, QWidget *parent = 0 );
+ explicit RoutingInputWidget( MarbleWidget* widget, int index, QWidget *parent = 0 );
/** Destructor */
~RoutingInputWidget();
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingWidget.cpp #1181390:1181391
@@ -376,7 +376,7 @@
void RoutingWidget::insertInputWidget( int index )
{
if ( index >= 0 && index <= d->m_inputWidgets.size() ) {
- RoutingInputWidget *input = new RoutingInputWidget( d->m_widget->map(), index, this );
+ RoutingInputWidget *input = new RoutingInputWidget( d->m_widget, index, this );
input->setProgressAnimation( d->m_progressAnimation );
input->setWorkOffline( d->m_workOffline );
d->m_inputWidgets.insert( index, input );
More information about the Marble-commits
mailing list