KDE 4.7 PyKDE API Reference

- KDE's Python API

# RouteRequest Class Reference

`from PyKDE4.marble import *`

Inherits: QObject
Namespace: Marble

## Detailed Description

Points to be included in a route. An ordered list of GeoDataCoordinates with change notification and Pixmap access, similar to QAbstractItemModel.

## Signals
| positionAdded (int index)
| positionChanged (int index, Marble.GeoDataCoordinates position)
| positionRemoved (int index)
| routingProfileChanged ()
## Methods
| __init__ (self, QObject parent=0)
| addVia (self, Marble.GeoDataCoordinates position)
| append (self, Marble.GeoDataCoordinates coordinates)
Marble.GeoDataCoordinates | at (self, int index)
| clear (self)
Marble.GeoDataCoordinates | destination (self)
| insert (self, int index, Marble.GeoDataCoordinates coordinates)
QString | name (self, int index)
QPixmap | pixmap (self, int index)
| remove (self, int index)
| reverse (self)
Marble.RoutingProfile | routingProfile (self)
| setName (self, int index, QString name)
| setPosition (self, int index, Marble.GeoDataCoordinates position)
| setRoutingProfile (self, Marble.RoutingProfile profile)
| setVisited (self, int index, bool visited)
int | size (self)
Marble.GeoDataCoordinates | source (self)
bool | visited (self, int index)

## Signal Documentation

positionAdded | ( | int | index
| ) |  |  |

An element was added at the given position

Signal syntax:
  `QObject.connect(source, SIGNAL("positionAdded(int)"), target_slot)`

positionChanged | ( | int | index,
|  | Marble.GeoDataCoordinates | position
| ) |  |  |

The value of the n-th element was changed

Signal syntax:
  `QObject.connect(source, SIGNAL("positionChanged(int, const Marble::GeoDataCoordinates&)"), target_slot)`

positionRemoved | ( | int | index
| ) |  |  |

The element at the given position was removed

Signal syntax:
  `QObject.connect(source, SIGNAL("positionRemoved(int)"), target_slot)`

routingProfileChanged | ( |  | ) |

The routing profile was changed

Signal syntax:
  `QObject.connect(source, SIGNAL("routingProfileChanged()"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | QObject | parent=0
| ) |  |  |

Constructor

addVia | ( | self, |
|  | Marble.GeoDataCoordinates | position
| ) |  |  |

Insert a via point. Order will be chosen such that the via point is not before the start or after the destination. Furthermore the distance between neighboring route points is minimized

@note: This does not trigger an update of the route. It becomes "dirty"

@todo: Minimizing the distance might not always be what the user wants

append | ( | self, |
|  | Marble.GeoDataCoordinates | coordinates
| ) |  |  |

Add the given element to the end

Marble.GeoDataCoordinates at | ( | self, |
|  | int | index
| ) |  |  |

Accessor for the n-th position

clear | ( |  | self ) |

Remove all elements

Marble.GeoDataCoordinates destination | ( |  | self ) |

The last point, or a default constructed if empty

insert | ( | self, |
|  | int | index,
|  | Marble.GeoDataCoordinates | coordinates
| ) |  |  |

Add the given element at the given position

QString name | ( | self, |
|  | int | index
| ) |  |  |

QPixmap pixmap | ( | self, |
|  | int | index
| ) |  |  |

Returns a pixmap which indicates the position of the element

remove | ( | self, |
|  | int | index
| ) |  |  |

Remove the element at the given position

reverse | ( |  | self ) |

Marble.RoutingProfile routingProfile | ( |  | self ) |

setName | ( | self, |
|  | int | index,
|  | QString | name
| ) |  |  |

setPosition | ( | self, |
|  | int | index,
|  | Marble.GeoDataCoordinates | position
| ) |  |  |

Change the value of the element at the given position

setRoutingProfile | ( | self, |
|  | Marble.RoutingProfile | profile
| ) |  |  |

setVisited | ( | self, |
|  | int | index,
|  | bool | visited
| ) |  |  |

int size | ( |  | self ) |

Number of points in the route

Marble.GeoDataCoordinates source | ( |  | self ) |

The first point, or a default constructed if empty

bool visited | ( | self, |
|  | int | index
| ) |  |  |