• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • routing
RoutingModel.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2010 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #include "RoutingModel.h"
12 
13 #include "MarbleDebug.h"
14 #include "MarbleDirs.h"
15 #include "MarbleMath.h"
16 #include "GeoDataCoordinates.h"
17 #include "GeoDataDocument.h"
18 #include "GeoDataGeometry.h"
19 #include "GeoDataFolder.h"
20 #include "GeoDataPlacemark.h"
21 #include "RouteRequest.h"
22 #include "PositionTracking.h"
23 #include "MarbleModel.h"
24 #include "MarbleWidget.h"
25 #include "MarbleGlobal.h"
26 #include "GeoDataExtendedData.h"
27 
28 #include <QBuffer>
29 #include <QPointer>
30 #include <QRegExp>
31 #include <QVector>
32 #include <QHash>
33 #include <QByteArray>
34 #include <QMessageBox>
35 #include <QPixmap>
36 #include <QDomDocument>
37 
38 namespace Marble
39 {
40 
41 class RoutingModelPrivate
42 {
43 public:
44  enum RouteDeviation
45  {
46  Unknown,
47  OnRoute,
48  OffRoute
49  };
50 
51  RoutingModelPrivate( RouteRequest* request );
52 
53  Route m_route;
54 
55  RouteDeviation m_deviation;
56  PositionTracking* m_positionTracking;
57  RouteRequest* const m_request;
58  GeoDataCoordinates m_position;
59 #if QT_VERSION >= 0x050000
60  QHash<int, QByteArray> m_roleNames;
61 #endif
62 
63  static void importPlacemark( RouteSegment &outline, QVector<RouteSegment> &segments, const GeoDataPlacemark *placemark );
64 
65  void updateViaPoints( const GeoDataCoordinates &position );
66 };
67 
68 RoutingModelPrivate::RoutingModelPrivate( RouteRequest* request )
69  : m_deviation( Unknown ),
70  m_positionTracking( 0 ),
71  m_request( request )
72 {
73  // nothing to do
74 }
75 
76 void RoutingModelPrivate::updateViaPoints( const GeoDataCoordinates &position )
77 {
78  // Mark via points visited after approaching them in a range of 500m or less
79  qreal const threshold = 500 / EARTH_RADIUS;
80  for( int i=0; i<m_request->size(); ++i ) {
81  if ( !m_request->visited( i ) ) {
82  if ( distanceSphere( position, m_request->at( i ) ) < threshold ) {
83  m_request->setVisited( i, true );
84  }
85  }
86  }
87 }
88 
89 void RoutingModelPrivate::importPlacemark( RouteSegment &outline, QVector<RouteSegment> &segments, const GeoDataPlacemark *placemark )
90 {
91  const GeoDataGeometry* geometry = placemark->geometry();
92  const GeoDataLineString* lineString = dynamic_cast<const GeoDataLineString*>( geometry );
93  QStringList blacklist = QStringList() << "" << "Route" << "Tessellated";
94  RouteSegment segment;
95  bool isOutline = true;
96  if ( !blacklist.contains( placemark->name() ) ) {
97  if( lineString ) {
98  Maneuver maneuver;
99  maneuver.setInstructionText( placemark->name() );
100  maneuver.setPosition( lineString->at( 0 ) );
101 
102  if ( placemark->extendedData().contains( "turnType" ) ) {
103  QVariant turnType = placemark->extendedData().value( "turnType" ).value();
104  // The enum value is converted to/from an int in the QVariant
105  // because only a limited set of data types can be serialized with QVariant's
106  // toString() method (which is used to serialize <ExtendedData>/<Data> values)
107  maneuver.setDirection( Maneuver::Direction( turnType.toInt() ) );
108  }
109 
110  if ( placemark->extendedData().contains( "roadName" ) ) {
111  QVariant roadName = placemark->extendedData().value( "roadName" ).value();
112  maneuver.setRoadName( roadName.toString() );
113  }
114 
115  segment.setManeuver( maneuver );
116  isOutline = false;
117  }
118  }
119 
120  if ( lineString ) {
121  segment.setPath( *lineString );
122 
123  if ( isOutline ) {
124  outline = segment;
125  } else {
126  segments.push_back( segment );
127  }
128  }
129 }
130 
131 RoutingModel::RoutingModel( RouteRequest* request, MarbleModel *model, QObject *parent ) :
132  QAbstractListModel( parent ), d( new RoutingModelPrivate( request ) )
133 {
134  if( model )
135  {
136  d->m_positionTracking = model->positionTracking();
137  QObject::connect( d->m_positionTracking, SIGNAL(gpsLocation(GeoDataCoordinates,qreal)),
138  this, SLOT(updatePosition(GeoDataCoordinates,qreal)) );
139  }
140 
141  QHash<int, QByteArray> roles;
142  roles.insert( Qt::DisplayRole, "display" );
143  roles.insert( RoutingModel::TurnTypeIconRole, "turnTypeIcon" );
144  roles.insert( RoutingModel::LongitudeRole, "longitude" );
145  roles.insert( RoutingModel::LatitudeRole, "latitude" );
146 #if QT_VERSION < 0x050000
147  setRoleNames( roles );
148 #else
149  d->m_roleNames = roles;
150 #endif
151 }
152 
153 RoutingModel::~RoutingModel()
154 {
155  delete d;
156 }
157 
158 int RoutingModel::rowCount ( const QModelIndex &parent ) const
159 {
160  return parent.isValid() ? 0 : d->m_route.turnPoints().size();
161 }
162 
163 QVariant RoutingModel::headerData ( int section, Qt::Orientation orientation, int role ) const
164 {
165  if ( orientation == Qt::Horizontal && role == Qt::DisplayRole && section == 0 ) {
166  return QString( "Instruction" );
167  }
168 
169  return QAbstractListModel::headerData( section, orientation, role );
170 }
171 
172 QVariant RoutingModel::data ( const QModelIndex & index, int role ) const
173 {
174  if ( !index.isValid() ) {
175  return QVariant();
176  }
177 
178  if ( index.row() < d->m_route.turnPoints().size() && index.column() == 0 ) {
179  const RouteSegment &segment = d->m_route.at( index.row() );
180  switch ( role ) {
181  case Qt::DisplayRole:
182  case Qt::ToolTipRole:
183  return segment.maneuver().instructionText();
184  break;
185  case Qt::DecorationRole:
186  {
187  bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
188  if ( segment.maneuver().hasWaypoint() ) {
189  int const size = smallScreen ? 64 : 32;
190  return d->m_request->pixmap( segment.maneuver().waypointIndex(), size, size/4 );
191  } else {
192  QPixmap const pixmap = segment.maneuver().directionPixmap();
193  return smallScreen ? pixmap : pixmap.scaled( 32, 32 );
194  }
195  }
196  break;
197  case Qt::SizeHintRole:
198  {
199  bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
200  int const size = smallScreen ? 64 : 32;
201  return QSize( size, size );
202  }
203  break;
204  case RoutingModel::CoordinateRole:
205  return QVariant::fromValue( segment.maneuver().position() );
206  break;
207  case RoutingModel::LongitudeRole:
208  return QVariant::fromValue( segment.maneuver().position().longitude( GeoDataCoordinates::Degree ) );
209  break;
210  case RoutingModel::LatitudeRole:
211  return QVariant::fromValue( segment.maneuver().position().latitude( GeoDataCoordinates::Degree ) );
212  break;
213  case RoutingModel::TurnTypeIconRole:
214  return segment.maneuver().directionPixmap();
215  break;
216  default:
217  return QVariant();
218  }
219  }
220 
221  return QVariant();
222 }
223 
224 #if QT_VERSION >= 0x050000
225 QHash<int, QByteArray> RoutingModel::roleNames() const
226 {
227  return d->m_roleNames;
228 }
229 #endif
230 
231 bool RoutingModel::setCurrentRoute( GeoDataDocument* document )
232 {
233  d->m_route = Route();
234  QVector<RouteSegment> segments;
235  RouteSegment outline;
236 
237  QVector<GeoDataFolder*> folders = document->folderList();
238  foreach( const GeoDataFolder *folder, folders ) {
239  foreach( const GeoDataPlacemark *placemark, folder->placemarkList() ) {
240  d->importPlacemark( outline, segments, placemark );
241  }
242  }
243 
244  foreach( const GeoDataPlacemark *placemark, document->placemarkList() ) {
245  d->importPlacemark( outline, segments, placemark );
246  }
247 
248  if ( segments.isEmpty() ) {
249  segments << outline;
250  }
251 
252  // Map via points onto segments
253  if ( d->m_request->size() > 1 && segments.size() > 1 ) {
254  int index = 0;
255  for ( int j=0; j<d->m_request->size(); ++j ) {
256  QPair<int, qreal> minimum( -1, -1.0 );
257  int viaIndex = -1;
258  for ( int i=index; i<segments.size(); ++i ) {
259  RouteSegment const & segment = segments[i];
260  GeoDataCoordinates closest;
261  qreal const distance = segment.distanceTo( d->m_request->at( j ), closest, closest );
262  if ( minimum.first < 0 || distance < minimum.second ) {
263  minimum.first = i;
264  minimum.second = distance;
265  viaIndex = j;
266  }
267  }
268 
269  if ( minimum.first >= 0 ) {
270  index = minimum.first;
271  Maneuver viaPoint = segments[ minimum.first ].maneuver();
272  viaPoint.setWaypoint( d->m_request->at( viaIndex ), viaIndex );
273  segments[ minimum.first ].setManeuver( viaPoint );
274  }
275  }
276  }
277 
278  if ( segments.size() > 0 ) {
279  foreach( const RouteSegment &segment, segments ) {
280  d->m_route.addRouteSegment( segment );
281  }
282  }
283 
284  d->m_deviation = RoutingModelPrivate::Unknown;
285 
286  beginResetModel();
287  endResetModel();
288  emit currentRouteChanged();
289  return true;
290 }
291 
292 void RoutingModel::exportGpx( QIODevice *device ) const
293 {
294  QString content( "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n" );
295  content += "<gpx xmlns=\"http://www.topografix.com/GPX/1/1\" creator=\"Marble\" version=\"1.1\" ";
296  content += "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
297  content += "xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 ";
298  content += "http://www.topografix.com/GPX/1/1/gpx.xsd\">\n";
299  content += "<metadata>\n <link href=\"http://edu.kde.org/marble\">\n ";
300  content += "<text>Marble Virtual Globe</text>\n </link>\n</metadata>\n";
301 
302  content += " <rte>\n <name>Route</name>\n";
303  bool hasAltitude = false;
304  for ( int i=0; !hasAltitude && i<d->m_route.size(); ++i ) {
305  hasAltitude = d->m_route.at( i ).maneuver().position().altitude() != 0.0;
306  }
307  for ( int i=0; i<d->m_route.size(); ++i ) {
308  const Maneuver &maneuver = d->m_route.at( i ).maneuver();
309  qreal lon = maneuver.position().longitude( GeoDataCoordinates::Degree );
310  qreal lat = maneuver.position().latitude( GeoDataCoordinates::Degree );
311  QString const text = maneuver.instructionText();
312  content += QString( " <rtept lat=\"%1\" lon=\"%2\">\n" ).arg( lat, 0, 'f', 7 ).arg( lon, 0, 'f', 7 );
313  content += QString( " <name>%1</name>\n").arg( text );
314  if ( hasAltitude ) {
315  content += QString( " <ele>%1</ele>\n" ).arg( maneuver.position().altitude(), 0, 'f', 2 );
316  }
317  content += QString( " </rtept>\n" );
318  }
319  content += " </rte>\n";
320 
321  content += "<trk>\n <name>Route</name>\n <trkseg>\n";
322  GeoDataLineString points = d->m_route.path();
323  hasAltitude = false;
324  for ( int i=0; !hasAltitude && i<points.size(); ++i ) {
325  hasAltitude = points[i].altitude() != 0.0;
326  }
327  for ( int i=0; i<points.size(); ++i ) {
328  GeoDataCoordinates const &point = points[i];
329  qreal lon = point.longitude( GeoDataCoordinates::Degree );
330  qreal lat = point.latitude( GeoDataCoordinates::Degree );
331  content += QString( " <trkpt lat=\"%1\" lon=\"%2\">\n" ).arg( lat, 0, 'f', 7 ).arg( lon, 0, 'f', 7 );
332  if ( hasAltitude ) {
333  content += QString( " <ele>%1</ele>\n" ).arg( point.altitude(), 0, 'f', 2 );
334  }
335  content += QString( " </trkpt>\n" );
336  }
337  content += " </trkseg>\n </trk>\n";
338  content += "</gpx>\n";
339 
340  device->write( content.toUtf8() );
341 }
342 
343 void RoutingModel::clear()
344 {
345  d->m_route = Route();
346  beginResetModel();
347  endResetModel();
348  emit currentRouteChanged();
349 }
350 
351 int RoutingModel::rightNeighbor( const GeoDataCoordinates &position, RouteRequest const *const route ) const
352 {
353  Q_ASSERT( route && "Must not pass a null route ");
354 
355  // Quick result for trivial cases
356  if ( route->size() < 3 ) {
357  return route->size() - 1;
358  }
359 
360  // Generate an ordered list of all waypoints
361  GeoDataLineString points = d->m_route.path();
362  QMap<int,int> mapping;
363 
364  // Force first mapping point to match the route start
365  mapping[0] = 0;
366 
367  // Calculate the mapping between waypoints and via points
368  // Need two for loops to avoid getting stuck in local minima
369  for ( int j=1; j<route->size()-1; ++j ) {
370  qreal minDistance = -1.0;
371  for ( int i=mapping[j-1]; i<points.size(); ++i ) {
372  qreal distance = distanceSphere( points[i], route->at(j) );
373  if (minDistance < 0.0 || distance < minDistance ) {
374  mapping[j] = i;
375  minDistance = distance;
376  }
377  }
378  }
379 
380  // Determine waypoint with minimum distance to the provided position
381  qreal minWaypointDistance = -1.0;
382  int waypoint=0;
383  for ( int i=0; i<points.size(); ++i ) {
384  qreal waypointDistance = distanceSphere( points[i], position );
385  if ( minWaypointDistance < 0.0 || waypointDistance < minWaypointDistance ) {
386  minWaypointDistance = waypointDistance;
387  waypoint = i;
388  }
389  }
390 
391  // Force last mapping point to match the route destination
392  mapping[route->size()-1] = points.size()-1;
393 
394  // Determine neighbor based on the mapping
395  QMap<int, int>::const_iterator iter = mapping.constBegin();
396  for ( ; iter != mapping.constEnd(); ++iter ) {
397  if ( iter.value() > waypoint ) {
398  int index = iter.key();
399  Q_ASSERT( index >= 0 && index <= route->size() );
400  return index;
401  }
402  }
403 
404  return route->size()-1;
405 }
406 
407 void RoutingModel::updatePosition( GeoDataCoordinates location, qreal /*speed*/ )
408 {
409  d->m_position = location;
410  d->m_route.setPosition( location );
411 
412  d->updateViaPoints( d->m_position );
413  qreal distance = EARTH_RADIUS * distanceSphere( location, d->m_route.positionOnRoute() );
414  emit positionChanged();
415 
416  qreal deviation = 0.0;
417  if ( d->m_positionTracking && d->m_positionTracking->accuracy().vertical > 0.0 ) {
418  deviation = qMax<qreal>( d->m_positionTracking->accuracy().vertical, d->m_positionTracking->accuracy().horizontal );
419  }
420  qreal const threshold = deviation + 100.0;
421 
422  RoutingModelPrivate::RouteDeviation const deviated = distance < threshold ? RoutingModelPrivate::OnRoute : RoutingModelPrivate::OffRoute;
423  if ( d->m_deviation != deviated ) {
424  d->m_deviation = deviated;
425  emit deviatedFromRoute( deviated == RoutingModelPrivate::OffRoute );
426  }
427 }
428 
429 bool RoutingModel::deviatedFromRoute() const
430 {
431  return d->m_deviation == RoutingModelPrivate::OffRoute;
432 }
433 
434 const Route & RoutingModel::route() const
435 {
436  return d->m_route;
437 }
438 
439 } // namespace Marble
440 
441 #include "RoutingModel.moc"
QIODevice
GeoDataDocument.h
Marble::RouteRequest::size
int size() const
Number of points in the route.
Definition: RouteRequest.cpp:126
Marble::RoutingModel::exportGpx
void exportGpx(QIODevice *device) const
Export waypoints and instructions in gpx format.
Definition: RoutingModel.cpp:292
QModelIndex
GeoDataCoordinates.h
Marble::RoutingModel::~RoutingModel
~RoutingModel()
Destructor.
Definition: RoutingModel.cpp:153
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
RoutingModel.h
QHash::insert
iterator insert(const Key &key, const T &value)
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
QAbstractItemModel::setRoleNames
void setRoleNames(const QHash< int, QByteArray > &roleNames)
MarbleMath.h
MarbleModel.h
This file contains the headers for MarbleModel.
Marble::GeoDataLineString::size
int size() const
Returns the number of nodes in a LineString.
Definition: GeoDataLineString.cpp:138
QAbstractItemModel::roleNames
const QHash< int, QByteArray > & roleNames() const
QMap::constBegin
const_iterator constBegin() const
QMap
QStringList::contains
bool contains(const QString &str, Qt::CaseSensitivity cs) const
QVariant::value
T value() const
Marble::RoutingModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Overload of QAbstractListModel.
Definition: RoutingModel.cpp:172
Marble::distanceSphere
qreal distanceSphere(qreal lon1, qreal lat1, qreal lon2, qreal lat2)
This method calculates the shortest distance between two points on a sphere.
Definition: MarbleMath.h:52
Marble::RoutingModel::route
const Route & route() const
Definition: RoutingModel.cpp:434
Marble::RoutingModel::updatePosition
void updatePosition(GeoDataCoordinates, qreal)
Definition: RoutingModel.cpp:407
Marble::RoutingModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const
Overload of QAbstractListModel.
Definition: RoutingModel.cpp:158
GeoDataExtendedData.h
Marble::GeoDataCoordinates::latitude
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
Definition: GeoDataCoordinates.cpp:751
MarbleDebug.h
Marble::GeoDataCoordinates::Degree
Definition: GeoDataCoordinates.h:66
Marble::RoutingModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Overload of QAbstractListModel.
Definition: RoutingModel.cpp:163
Marble::RoutingModel::setCurrentRoute
bool setCurrentRoute(GeoDataDocument *document)
Old data in the model is discarded, the parsed content of the provided document is used as the new mo...
Definition: RoutingModel.cpp:231
Marble::Maneuver
Definition: Maneuver.h:22
QAbstractItemModel::beginResetModel
void beginResetModel()
Marble::GeoDataCoordinates::altitude
qreal altitude() const
return the altitude of the Point in meters
Definition: GeoDataCoordinates.cpp:1197
Marble::RouteRequest
Points to be included in a route.
Definition: RouteRequest.h:31
Marble::Maneuver::directionPixmap
QString directionPixmap() const
Definition: Maneuver.cpp:47
Marble::Maneuver::setWaypoint
void setWaypoint(const GeoDataCoordinates &waypoint, int index)
Definition: Maneuver.cpp:91
QModelIndex::isValid
bool isValid() const
Marble::RoutingModel::positionChanged
void positionChanged()
emits a signal regarding information about total time( seconds ) and distance( metres ) remaining to ...
Marble::EARTH_RADIUS
const qreal EARTH_RADIUS
Definition: MarbleGlobal.h:257
QVariant::toInt
int toInt(bool *ok) const
QHash
QObject
QAbstractListModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
QAbstractListModel
MarbleDirs.h
Marble::GeoDataContainer::folderList
QVector< GeoDataFolder * > folderList() const
A convenience function that returns all folders in this container.
Definition: GeoDataContainer.cpp:197
QMap::constEnd
const_iterator constEnd() const
Marble::MarbleModel::positionTracking
PositionTracking * positionTracking() const
Definition: MarbleModel.cpp:512
Marble::Maneuver::hasWaypoint
bool hasWaypoint() const
Definition: Maneuver.cpp:86
QModelIndex::row
int row() const
QMap::const_iterator
QPixmap::scaled
QPixmap scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const
QString
MarbleGlobal.h
Marble::GeoDataFolder
Definition: GeoDataFolder.h:50
GeoDataPlacemark.h
Marble::RoutingModel::clear
void clear()
Clear any data held in the model.
Definition: RoutingModel.cpp:343
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
QStringList
QAbstractItemModel::headerData
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
QPair
QPixmap
Marble::Maneuver::instructionText
QString instructionText() const
Definition: Maneuver.cpp:102
Marble::GeoDataCoordinates::longitude
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCoordinates object use the unit parameter to switch between Rad...
Definition: GeoDataCoordinates.cpp:739
QSize
QVariant::fromValue
QVariant fromValue(const T &value)
Marble::MarbleGlobal::SmallScreen
Definition: MarbleGlobal.h:287
Marble::MarbleGlobal::getInstance
static MarbleGlobal * getInstance()
Definition: MarbleGlobal.cpp:37
Marble::RoutingModel::currentRouteChanged
void currentRouteChanged()
A different route was loaded.
GeoDataFolder.h
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
QVector
Marble::RoutingModel::deviatedFromRoute
bool deviatedFromRoute() const
returns whether the gps location is on route
QVector::isEmpty
bool isEmpty() const
Marble::MarbleGlobal::profiles
Profiles profiles() const
Definition: MarbleGlobal.cpp:48
Marble::RouteSegment::distanceTo
qreal distanceTo(const GeoDataCoordinates &point, GeoDataCoordinates &closest, GeoDataCoordinates &interpolated) const
Definition: RouteSegment.cpp:149
QModelIndex::column
int column() const
Marble::RoutingModel::LatitudeRole
Definition: RoutingModel.h:45
QVector::push_back
void push_back(const T &value)
QIODevice::write
qint64 write(const char *data, qint64 maxSize)
MarbleWidget.h
This file contains the headers for MarbleWidget.
Marble::Route
Definition: Route.h:20
RouteRequest.h
Marble::RoutingModel::CoordinateRole
Definition: RoutingModel.h:42
GeoDataGeometry.h
Marble::RoutingModel::rightNeighbor
int rightNeighbor(const GeoDataCoordinates &position, RouteRequest const *const route) const
Maps points from the provided route request to waypoints in the model according to their global minim...
Definition: RoutingModel.cpp:351
PositionTracking.h
Marble::RouteSegment
Definition: RouteSegment.h:23
QAbstractItemModel::endResetModel
void endResetModel()
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Marble::Maneuver::waypointIndex
int waypointIndex() const
Definition: Maneuver.cpp:97
QVector::size
int size() const
Marble::RoutingModel::TurnTypeIconRole
Definition: RoutingModel.h:43
QString::arg
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QVariant::toString
QString toString() const
Marble::Maneuver::position
GeoDataCoordinates position() const
Definition: Maneuver.cpp:71
Marble::GeoDataPlacemark
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
Marble::RouteSegment::maneuver
const Maneuver & maneuver() const
Definition: RouteSegment.cpp:32
Marble::RoutingModel::LongitudeRole
Definition: RoutingModel.h:44
Marble::RoutingModel::RoutingModel
RoutingModel(RouteRequest *request, MarbleModel *model, QObject *parent=0)
Constructor.
Definition: RoutingModel.cpp:131
Marble::Maneuver::Direction
Direction
Definition: Maneuver.h:26
QVariant
Marble::GeoDataContainer::placemarkList
QVector< GeoDataPlacemark * > placemarkList() const
A convenience function that returns all placemarks in this container.
Definition: GeoDataContainer.cpp:214
Marble::RouteRequest::at
GeoDataCoordinates at(int index) const
Accessor for the n-th position.
Definition: RouteRequest.cpp:149
QString::toUtf8
QByteArray toUtf8() 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

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal