marble
RoutingInputWidget.cpp
Go to the documentation of this file.
96 static void createBookmarkActions( QMenu* menu, GeoDataFolder* bookmarksFolder, QObject *parent );
114 QString const name = QObject::tr("%1 %2, %3", "An address with parameters %1=house number, %2=road, %3=city");
147 RoutingInputWidgetPrivate::RoutingInputWidgetPrivate( MarbleModel* model, int index, QWidget *parent ) :
152 m_placemarkModel( 0 ), m_route( m_marbleModel->routingManager()->routeRequest() ), m_index( index ),
184 m_centerAction = result->addAction( QIcon( m_route->pixmap( m_index ) ), QObject::tr( "&Center Map here" ),
188 m_currentLocationAction = result->addAction( QIcon( ":/icons/gps.png" ), QObject::tr( "Current &Location" ),
192 m_mapInput = result->addAction( QIcon( ":/icons/crosshairs.png" ), QObject::tr( "From &Map..." ) );
194 QObject::connect( m_mapInput, SIGNAL(triggered(bool)), parent, SLOT(setMapInputModeEnabled(bool)) );
196 m_bookmarkAction = result->addAction( QIcon( ":/icons/bookmarks.png" ), QObject::tr( "From &Bookmark" ) );
205 result->addAction( QIcon( ":/icons/go-home.png" ), QObject::tr( "&Home" ), parent, SLOT(setHomePosition()) );
224 void RoutingInputWidgetPrivate::createBookmarkActions( QMenu* menu, GeoDataFolder* bookmarksFolder, QObject *parent )
234 QObject::connect( menu, SIGNAL(triggered(QAction*)), parent, SLOT(setBookmarkPosition(QAction*)) );
265 connect( d->m_lineEdit, SIGNAL(decoratorButtonClicked()), this, SLOT(openTargetSelectionDialog()) );
278 connect( &d->m_reverseGeocodingRunnerManager, SIGNAL(reverseGeocodingFinished(GeoDataCoordinates,GeoDataPlacemark)),
286 connect( d->m_marbleModel->routingManager()->routeRequest(), SIGNAL(positionChanged(int,GeoDataCoordinates)),
320 void RoutingInputWidget::setTargetPosition( const GeoDataCoordinates &position, const QString &name )
428 void RoutingInputWidget::retrieveReverseGeocodingResult( const GeoDataCoordinates &, const GeoDataPlacemark &placemark )
QLayout * layout() const
QSize size() const
void setIndex(int index)
Change the data index in the route request model.
Definition: RoutingInputWidget.cpp:403
This class represents a model of all place marks which are currently available through a given Placem...
Definition: MarblePlacemarkModel.h:37
int width() const
This file contains the headers for MarbleModel.
QVariant data() const
const_iterator constEnd() const
QPoint mapToGlobal(const QPoint &pos) const
T value() const
GeoDataCoordinates targetPosition() const
Returns the geoposition selected by the user, or a default constructed geoposition if hasTargetPositi...
Definition: RoutingInputWidget.cpp:337
T & first()
void searchFinished(RoutingInputWidget *)
All runners are finished.
QString tr(const char *sourceText, const char *disambiguation, int n)
bool hasInput() const
Returns false iff the input text is empty.
Definition: RoutingInputWidget.cpp:374
MarblePlacemarkModel * searchResultModel()
Returns the placemark model that contains search results.
Definition: RoutingInputWidget.cpp:357
QSize size() const
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
void setTargetPosition(const GeoDataCoordinates &position, const QString &name=QString())
Set the target position to the given coordinates, eliminating any previously set positions.
Definition: RoutingInputWidget.cpp:320
bool isNull() const
void findPlacemarks()
Search for placemarks matching the current input text.
Definition: RoutingInputWidget.cpp:346
void abortMapInputRequest()
Cancel a started input request from the map.
Definition: RoutingInputWidget.cpp:396
void targetValidityChanged(bool targetValid)
hasTargetPosition changed because of selecting a placemark or changing the search term ...
bool isEmpty() const
void activityRequest(RoutingInputWidget *)
User requests to activate this widget.
void setMargin(int margin)
PositionProviderStatus
Definition: PositionProviderPluginInterface.h:25
void setData(const QVariant &userData)
void mapInputModeEnabled(RoutingInputWidget *, bool enabled)
User requests position input from the map.
int height() const
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
const_iterator constBegin() const
bool hasTargetPosition() const
Returns true if the user has selected a valid geo position.
Definition: RoutingInputWidget.cpp:332
QString name() const
void removalRequest(RoutingInputWidget *)
User requests to remove this widget.
This file contains the headers for MarbleWidget.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int size() const
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
void setSpacing(int spacing)
int height() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.