Commit 44e40518 authored by Gus Grubba's avatar Gus Grubba

Preliminary work on the Flight View

parent d2c0ef2c
......@@ -127,7 +127,9 @@ include(QGCExternalLibs.pri)
# Main QGroundControl portion of project file
#
RESOURCES += qgroundcontrol.qrc
RESOURCES += \
qgroundcontrol.qrc \
qgcresources.qrc
DEPENDPATH += \
. \
......
This diff is collapsed.
This diff is collapsed.
......@@ -30,41 +30,43 @@ import QGroundControl.FlightDisplay 1.0
import QGroundControl.ScreenTools 1.0
/// Qml for MainWindow
FlightDisplayView {
Item {
id: _root
topMargin: toolbarLoader.height + (ScreenTools.defaultFontPixelHeight / 2)
property var _toolbar: toolbarLoader.item
readonly property string _planViewSource: "MissionEditor.qml"
readonly property string _setupViewSource: "SetupView.qml"
Connections {
target: controller
onShowFlyView: {
setupViewLoader.visible = false
planViewLoader.visible = false
_root.hideWidgets = false
flightView.visible = true
setupViewLoader.visible = false
planViewLoader.visible = false
_root.hideWidgets = false
}
onShowPlanView: {
if (planViewLoader.source != _planViewSource) {
planViewLoader.source = _planViewSource
if (planViewLoader.source != _planViewSource) {
planViewLoader.source = _planViewSource
}
setupViewLoader.visible = false
planViewLoader.visible = true
_root.hideWidgets = true
flightView.visible = false
setupViewLoader.visible = false
planViewLoader.visible = true
_root.hideWidgets = true
}
onShowSetupView: {
if (setupViewLoader.source != _setupViewSource) {
setupViewLoader.source = _setupViewSource
if (setupViewLoader.source != _setupViewSource) {
setupViewLoader.source = _setupViewSource
}
setupViewLoader.visible = true
planViewLoader.visible = false
_root.hideWidgets = true
flightView.visible = false
setupViewLoader.visible = true
planViewLoader.visible = false
_root.hideWidgets = true
}
onShowToolbarMessage: _toolbar.showToolbarMessage(message)
......@@ -83,19 +85,30 @@ FlightDisplayView {
}
Loader {
id: toolbarLoader
width: parent.width
height: item ? item.height : 0
z: _root.zOrderTopMost
id: toolbarLoader
width: parent.width
height: item ? item.height : 0
z: _root.zOrderTopMost
}
FlightDisplayView {
id: flightView
anchors.left: parent.left
anchors.right: parent.right
anchors.top: toolbarLoader.bottom
anchors.bottom: parent.bottom
visible: true
property real zOrder: _root.zOrderTopMost
}
Loader {
id: planViewLoader
anchors.left: parent.left
anchors.right: parent.right
anchors.top: toolbarLoader.bottom
anchors.bottom: parent.bottom
visible: false
id: planViewLoader
anchors.left: parent.left
anchors.right: parent.right
anchors.top: toolbarLoader.bottom
anchors.bottom: parent.bottom
visible: false
property real zOrder: _root.zOrderTopMost
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment