df7e13d734
Still evolving but usable to import or build a route now
43 lines
982 B
QML
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
|
|
}
|
|
}
|