/usr/lib/kde4/plugins/marble/13/org/kde/edu/marble/qtcomponents/RouteEditor.qml is in marble-plugins 4:4.8.2-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | // This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2011 Dennis Nienhüser <earthwings@gentoo.org>
import QtQuick 1.0
import com.nokia.meego 1.0
import org.kde.edu.marble 0.11
Item {
id: root
z: 10
height: content.height
property string searchTerm: ""
function calculateRoute() {
marbleWidget.getRouting().routingProfile = routingTypeOptions.routingType
marbleWidget.getRouting().updateRoute()
}
Column {
id: content
width: parent.width
height: routingTypeOptions.height + routeActions.height + listView.height + 10
anchors.margins: 5
spacing: 5
ListView {
id: listView
width: parent.width
height: 40 * count
interactive: false
model: marbleWidget.routeRequestModel()
delegate: ViaPointEditor {
id: sourcePoint
width: content.width
height: 40
Component.onCompleted: marbleWidget.mouseClickGeoPosition.connect(retrieveInput)
onPositionChanged: root.calculateRoute()
}
}
Row {
id: routeActions
width: parent.width
Button {
text: "Add"
width: parent.width / 3 - 5
/** @todo: Ask user instead to click on a point? */
onClicked: marbleWidget.getRouting().addVia(marbleWidget.getCenter().longitude, marbleWidget.getCenter().latitude)
}
Button {
text: "Reverse"
width: parent.width / 3 - 5
onClicked: marbleWidget.getRouting().reverseRoute()
}
Button {
text: "Clear"
width: parent.width / 3 - 5
onClicked: marbleWidget.getRouting().clearRoute()
}
}
ButtonRow {
width: parent.width - 20
id: routingTypeOptions
checkedButton: routingMotorcarButton
property string routingType: checkedButton.routingType
Button {
id: routingMotorcarButton
iconSource: "qrc:/icons/routing-motorcar.svg"
property string routingType: "Motorcar"
}
Button {
id: routingBikeButton
iconSource: "qrc:/icons/routing-bike.svg"
property string routingType: "Bicycle"
}
Button {
id: routingPedestrianButton
iconSource: "qrc:/icons/routing-pedestrian.svg"
property string routingType: "Pedestrian"
}
}
}
Connections { target: routingTypeOptions; onRoutingTypeChanged: root.calculateRoute() }
Component.onCompleted: {
marbleWidget.getRouting().addVia(marbleWidget.getTracking().lastKnownPosition.longitude, marbleWidget.getTracking().lastKnownPosition.latitude)
}
}
|