AlternativeRoutesModel Class Reference
from PyKDE4.marble import *
Inherits: QAbstractListModel → QAbstractItemModel → QObject
Namespace: Marble
Detailed Description
Enumerations |
WritePolicy | { Instant, Lazy } |
Signals |
| currentRouteChanged (Marble.GeoDataDocument newRoute) |
Methods |
| __init__ (self, QObject parent=0) |
| addRoute (self, Marble.GeoDataDocument document, Marble.AlternativeRoutesModel.WritePolicy policy=Marble.AlternativeRoutesModel.Lazy) |
| clear (self) |
Marble.GeoDataDocument | currentRoute (self) |
QVariant | data (self, QModelIndex index, int role=Qt.DisplayRole) |
QVariant | headerData (self, int section, Qt::Orientation orientation, int role=Qt.DisplayRole) |
| newRequest (self, Marble.RouteRequest request) |
Marble.GeoDataDocument | route (self, int index) |
int | rowCount (self, QModelIndex parent=QModelIndex()) |
| setCurrentRoute (self, int index) |
Static Methods |
QVector | deviation (Marble.GeoDataDocument routeA, Marble.GeoDataDocument routeB) |
float | distance (Marble.GeoDataCoordinates satellite, Marble.GeoDataCoordinates lineA, Marble.GeoDataCoordinates lineB) |
Marble.GeoDataLineString | waypoints (Marble.GeoDataDocument document) |
Signal Documentation
- Signal syntax:
QObject.connect(source, SIGNAL("currentRouteChanged(Marble::GeoDataDocument*)"), target_slot)
Method Documentation
__init__ |
( |
self, |
|
|
|
QObject |
parent=0 |
|
) |
|
|
|
Old data in the model is discarded, the parsed content of the provided document
is used as the new model data and a model reset is done
- Parameters:
-
| document | The route to add
|
| policy | In lazy mode (default), a short amount of time is waited for
other addRoute() calls before adding the route to the model. Otherwise, the
model is changed immediately.
|
Remove all alternative routes from the model
QVariant data |
( |
self, |
|
|
|
QModelIndex |
index, |
|
|
int |
role=Qt.DisplayRole |
|
) |
|
|
|
Overload of QAbstractListModel
QVariant headerData |
( |
self, |
|
|
|
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role=Qt.DisplayRole |
|
) |
|
|
|
Overload of QAbstractListModel
Invalidate the current alternative routes and prepare for new ones to arrive
int rowCount |
( |
self, |
|
|
|
QModelIndex |
parent=QModelIndex() |
|
) |
|
|
|
Overload of QAbstractListModel
setCurrentRoute |
( |
self, |
|
|
|
int |
index |
|
) |
|
|
|
Static Method Documentation
Returns the minimal distance of each waypoint of routeA to routeB
Returns the distance between the given point and the given great circle path
Returns the waypoints contained in the route as a linestring
Enumeration Documentation