Marble::RoutingManager
#include <RoutingManager.h>
Public Types | |
enum | State { Downloading , Retrieved } |
Public Types inherited from QObject | |
typedef | QObjectList |
Properties | |
bool | guidanceModeEnabled |
State | state |
Properties inherited from QObject | |
objectName | |
Signals | |
void | guidanceModeEnabledChanged (bool enabled) |
void | routeRetrieved (GeoDataDocument *route) |
void | stateChanged (RoutingManager::State newState) |
Public Slots | |
void | clearRoute () |
void | retrieveRoute () |
void | reverseRoute () |
void | setGuidanceModeEnabled (bool enabled) |
Public Member Functions | |
RoutingManager (MarbleModel *marbleModel, QObject *parent=nullptr) | |
~RoutingManager () override | |
AlternativeRoutesModel * | alternativeRoutesModel () |
RoutingProfile | defaultProfile (RoutingProfile::TransportType transportType) const |
bool | guidanceModeEnabled () const |
QString | lastOpenPath () const |
QString | lastSavePath () const |
void | loadRoute (const QString &filename) |
RoutingProfilesModel * | profilesModel () |
Q_ENUM (State) | |
void | readSettings () |
QColor | routeColorAlternative () const |
QColor | routeColorHighlighted () const |
QColor | routeColorStandard () const |
RouteRequest * | routeRequest () |
RoutingModel * | routingModel () |
const RoutingModel * | routingModel () const |
void | saveRoute (const QString &filename) const |
void | setLastOpenPath (const QString &path) |
void | setLastSavePath (const QString &path) |
void | setRouteColorAlternative (const QColor &color) |
void | setRouteColorHighlighted (const QColor &color) |
void | setRouteColorStandard (const QColor &color) |
void | setShowGuidanceModeStartupWarning (bool show) |
bool | showGuidanceModeStartupWarning () const |
State | state () const |
void | writeSettings () const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QBindable< QString > | bindableObjectName () |
bool | blockSignals (bool block) |
const QObjectList & | children () const const |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectInfo () const const |
void | dumpObjectTree () const const |
QList< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (Qt::FindChildOptions options) const const |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
bool | isQuickItemType () const const |
bool | isWidgetType () const const |
bool | isWindowType () const const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
QVariant | property (const char *name) const const |
Q_CLASSINFO (Name, Value) | |
Q_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_GADGET_EXPORT (EXPORT_MACRO) | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
Q_MOC_INCLUDE Q_MOC_INCLUDE | |
Q_NAMESPACE Q_NAMESPACE | |
Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
Q_OBJECT Q_OBJECT | |
Q_PROPERTY (...) | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
Q_SIGNAL Q_SIGNAL | |
Q_SIGNALS Q_SIGNALS | |
Q_SLOT Q_SLOT | |
Q_SLOTS Q_SLOTS | |
T | qobject_cast (const QObject *object) |
T | qobject_cast (QObject *object) |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
void | removeEventFilter (QObject *obj) |
void | setObjectName (const QString &name) |
void | setObjectName (QAnyStringView name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | setProperty (const char *name, QVariant &&value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType) |
QThread * | thread () const const |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
Delegates data retrieval and model updates to the appropriate routing provider.
Definition at line 27 of file RoutingManager.h.
Member Enumeration Documentation
◆ State
enum Marble::RoutingManager::State |
Definition at line 34 of file RoutingManager.h.
Property Documentation
◆ guidanceModeEnabled
|
readwrite |
Definition at line 31 of file RoutingManager.h.
◆ state
|
read |
Definition at line 30 of file RoutingManager.h.
Constructor & Destructor Documentation
◆ RoutingManager()
|
explicit |
Constructor.
Definition at line 257 of file RoutingManager.cpp.
◆ ~RoutingManager()
|
override |
Destructor.
Definition at line 267 of file RoutingManager.cpp.
Member Function Documentation
◆ alternativeRoutesModel()
AlternativeRoutesModel * Marble::RoutingManager::alternativeRoutesModel | ( | ) |
Provides access to the model which contains a list of alternative routes.
Definition at line 440 of file RoutingManager.cpp.
◆ clearRoute
|
slot |
Clear all via points.
Definition at line 571 of file RoutingManager.cpp.
◆ defaultProfile()
RoutingProfile Marble::RoutingManager::defaultProfile | ( | RoutingProfile::TransportType | transportType | ) | const |
Generates a routing profile with default settings for the given transport type.
Definition at line 460 of file RoutingManager.cpp.
◆ guidanceModeEnabled()
bool Marble::RoutingManager::guidanceModeEnabled | ( | ) | const |
Definition at line 637 of file RoutingManager.cpp.
◆ lastOpenPath()
QString Marble::RoutingManager::lastOpenPath | ( | ) | const |
Return last directory the user opened a route from.
Definition at line 592 of file RoutingManager.cpp.
◆ lastSavePath()
QString Marble::RoutingManager::lastSavePath | ( | ) | const |
Return last directory the user saved a route to.
Definition at line 602 of file RoutingManager.cpp.
◆ loadRoute()
void Marble::RoutingManager::loadRoute | ( | const QString & | filename | ) |
Opens the given filename (kml format) and loads the route contained in it.
Definition at line 455 of file RoutingManager.cpp.
◆ profilesModel()
RoutingProfilesModel * Marble::RoutingManager::profilesModel | ( | ) |
Provides access to the model which contains all possible routing profiles.
Definition at line 272 of file RoutingManager.cpp.
◆ readSettings()
void Marble::RoutingManager::readSettings | ( | ) |
Restores a previously saved route request and route from disk, if any.
Definition at line 491 of file RoutingManager.cpp.
◆ retrieveRoute
|
slot |
Retrieve a route suiting the routeRequest.
Definition at line 297 of file RoutingManager.cpp.
◆ reverseRoute
|
slot |
Reverse the previously requested route, i.e.
swap start and destination (and via points, if any)
Definition at line 565 of file RoutingManager.cpp.
◆ routeColorAlternative()
QColor Marble::RoutingManager::routeColorAlternative | ( | ) | const |
Get color for alternative route rendering.
Definition at line 632 of file RoutingManager.cpp.
◆ routeColorHighlighted()
QColor Marble::RoutingManager::routeColorHighlighted | ( | ) | const |
Get color for highlighted route rendering.
Definition at line 622 of file RoutingManager.cpp.
◆ routeColorStandard()
QColor Marble::RoutingManager::routeColorStandard | ( | ) | const |
Get color for standard route rendering.
Definition at line 612 of file RoutingManager.cpp.
◆ routeRequest()
RouteRequest * Marble::RoutingManager::routeRequest | ( | ) |
Returns the current route request.
Definition at line 287 of file RoutingManager.cpp.
◆ routingModel() [1/2]
RoutingModel * Marble::RoutingManager::routingModel | ( | ) |
Provides access to the routing model which contains a list of routing instructions describing steps to get from the source to the destination.
- See also
- retrieveDirections
Definition at line 277 of file RoutingManager.cpp.
◆ routingModel() [2/2]
const RoutingModel * Marble::RoutingManager::routingModel | ( | ) | const |
Definition at line 282 of file RoutingManager.cpp.
◆ saveRoute()
void Marble::RoutingManager::saveRoute | ( | const QString & | filename | ) | const |
Saves the current route to the file with the given filename.
Existing files will be overwritten. The route is saved in kml format.
Definition at line 450 of file RoutingManager.cpp.
◆ setGuidanceModeEnabled
|
slot |
Toggle turn by turn navigation mode.
Definition at line 496 of file RoutingManager.cpp.
◆ setLastOpenPath()
void Marble::RoutingManager::setLastOpenPath | ( | const QString & | path | ) |
Set last directory the user opened a route from.
Definition at line 587 of file RoutingManager.cpp.
◆ setLastSavePath()
void Marble::RoutingManager::setLastSavePath | ( | const QString & | path | ) |
Set last directory the user saved a route to.
Definition at line 597 of file RoutingManager.cpp.
◆ setRouteColorAlternative()
void Marble::RoutingManager::setRouteColorAlternative | ( | const QColor & | color | ) |
Set color for alternative route rendering.
Definition at line 627 of file RoutingManager.cpp.
◆ setRouteColorHighlighted()
void Marble::RoutingManager::setRouteColorHighlighted | ( | const QColor & | color | ) |
Set color for highlighted route rendering.
Definition at line 617 of file RoutingManager.cpp.
◆ setRouteColorStandard()
void Marble::RoutingManager::setRouteColorStandard | ( | const QColor & | color | ) |
Set color for standard route rendering.
Definition at line 607 of file RoutingManager.cpp.
◆ setShowGuidanceModeStartupWarning()
void Marble::RoutingManager::setShowGuidanceModeStartupWarning | ( | bool | show | ) |
Set whether a warning message should be shown to the user before starting guidance mode.
Definition at line 577 of file RoutingManager.cpp.
◆ showGuidanceModeStartupWarning()
bool Marble::RoutingManager::showGuidanceModeStartupWarning | ( | ) | const |
Returns true (default) if a warning is shown to the user when starting guidance mode.
Definition at line 582 of file RoutingManager.cpp.
◆ state()
RoutingManager::State Marble::RoutingManager::state | ( | ) | const |
Returns whether a route is being downloaded.
- Returns
Definition at line 292 of file RoutingManager.cpp.
◆ stateChanged
|
signal |
Directions and waypoints for the given route are being downloaded or have been retrieved – newState tells which of both.
◆ writeSettings()
void Marble::RoutingManager::writeSettings | ( | ) | const |
Saves the current route request and the current route to disk.
Definition at line 445 of file RoutingManager.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.