1
0
Fork 0
flightgear/src/GUI/qml/PlanRouteDetails.qml
James Turner df7e13d734 Flight planning in the launcher
Still evolving but usable to import or build a route now
2018-08-28 12:23:01 +01:00

43 lines
982 B
QML

import QtQuick 2.4
import FlightGear 1.0
import FlightGear.Launcher 1.0
import "."
Item {
id: root
property alias legIndex: diagram.activeLegIndex
RouteDiagram {
id: diagram
anchors.fill: parent
flightplan: _launcher.flightPlan
}
Button {
id: previousButton
text: qsTr("Previous Leg")
enabled: diagram.activeLegIndex > 0
onClicked: {
diagram.activeLegIndex = diagram.activeLegIndex - 1
}
anchors.right: root.horizontalCenter
anchors.bottom: root.bottom
anchors.margins: Style.margin
}
Button {
text: qsTr("Next Leg")
width: previousButton.width
enabled: diagram.activeLegIndex < (diagram.numLegs - 1)
onClicked: {
diagram.activeLegIndex = diagram.activeLegIndex + 1
}
anchors.left: root.horizontalCenter
anchors.bottom: root.bottom
anchors.margins: Style.margin
}
}