[Marble-commits] KDE/kdeedu/marble/src/lib
Thibaut Gridel
tgridel at free.fr
Sun Dec 26 14:55:15 CET 2010
SVN commit 1209327 by tgridel:
MarbleRunnerManager: searchResultChanged should return a QAbstractItemModel
M +3 -2 MarbleRunnerManager.h
M +1 -1 NavigationWidget.cpp
M +4 -4 routing/RoutingInputWidget.cpp
M +2 -1 routing/RoutingInputWidget.h
--- trunk/KDE/kdeedu/marble/src/lib/MarbleRunnerManager.h #1209326:1209327
@@ -18,13 +18,14 @@
#include <QtCore/QString>
#include <QtCore/QMutex>
+class QAbstractItemModel;
+
namespace Marble
{
class GeoDataDocument;
class GeoDataPlacemark;
class MarbleModel;
-class MarblePlacemarkModel;
class PluginManager;
class RouteRequest;
@@ -78,7 +79,7 @@
* Placemarks were added to or removed from the model
* @todo FIXME: this sounds like a duplication of QAbstractItemModel signals
*/
- void searchResultChanged( MarblePlacemarkModel *model );
+ void searchResultChanged( QAbstractItemModel *model );
/**
* The search request for the given search term has finished, i.e. all
--- trunk/KDE/kdeedu/marble/src/lib/NavigationWidget.cpp #1209326:1209327
@@ -102,7 +102,7 @@
void NavigationWidget::setMarbleWidget( MarbleWidget *widget )
{
d->m_runnerManager = new MarbleRunnerManager( widget->model()->pluginManager(), this );
- connect( d->m_runnerManager, SIGNAL( searchResultChanged( MarblePlacemarkModel* ) ),
+ connect( d->m_runnerManager, SIGNAL( searchResultChanged( QAbstractItemModel* ) ),
this, SLOT( setLocations( QAbstractItemModel* ) ) );
d->m_widget = widget;
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingInputWidget.cpp #1209326:1209327
@@ -243,8 +243,8 @@
this, SLOT( reloadBookmarks() ) );
connect( d->m_marbleModel->positionTracking(), SIGNAL( statusChanged( PositionProviderStatus ) ),
this, SLOT( updateCurrentLocationButton( PositionProviderStatus ) ) );
- connect( d->m_runnerManager, SIGNAL( searchResultChanged( MarblePlacemarkModel * ) ),
- this, SLOT( setPlacemarkModel( MarblePlacemarkModel * ) ) );
+ connect( d->m_runnerManager, SIGNAL( searchResultChanged( QAbstractItemModel * ) ),
+ this, SLOT( setPlacemarkModel( QAbstractItemModel * ) ) );
connect( d->m_runnerManager, SIGNAL( reverseGeocodingFinished( GeoDataCoordinates, GeoDataPlacemark )),
this, SLOT(retrieveReverseGeocodingResult( GeoDataCoordinates, GeoDataPlacemark ) ) );
connect( d->m_lineEdit, SIGNAL( returnPressed() ),
@@ -279,9 +279,9 @@
d->m_runnerManager->reverseGeocoding( targetPosition() );
}
-void RoutingInputWidget::setPlacemarkModel( MarblePlacemarkModel *model )
+void RoutingInputWidget::setPlacemarkModel( QAbstractItemModel *model )
{
- d->m_placemarkModel = model;
+ d->m_placemarkModel = static_cast<MarblePlacemarkModel*>(model);
}
void RoutingInputWidget::setTargetPosition( const GeoDataCoordinates &position )
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingInputWidget.h #1209326:1209327
@@ -18,6 +18,7 @@
#include <QtGui/QWidget>
class QNetworkReply;
+class QAbstractItemModel;
namespace Marble
{
@@ -127,7 +128,7 @@
private Q_SLOTS:
/** Runner progress */
- void setPlacemarkModel( MarblePlacemarkModel * );
+ void setPlacemarkModel( QAbstractItemModel * );
/** Handle click on the goto target button */
void requestActivity();
More information about the Marble-commits
mailing list