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) ...@@ -127,7 +127,9 @@ include(QGCExternalLibs.pri)
# Main QGroundControl portion of project file # Main QGroundControl portion of project file
# #
RESOURCES += qgroundcontrol.qrc RESOURCES += \
qgroundcontrol.qrc \
qgcresources.qrc
DEPENDPATH += \ DEPENDPATH += \
. \ . \
......
This diff is collapsed.
This diff is collapsed.
...@@ -30,41 +30,43 @@ import QGroundControl.FlightDisplay 1.0 ...@@ -30,41 +30,43 @@ import QGroundControl.FlightDisplay 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
/// Qml for MainWindow /// Qml for MainWindow
FlightDisplayView { Item {
id: _root id: _root
topMargin: toolbarLoader.height + (ScreenTools.defaultFontPixelHeight / 2)
property var _toolbar: toolbarLoader.item property var _toolbar: toolbarLoader.item
readonly property string _planViewSource: "MissionEditor.qml" readonly property string _planViewSource: "MissionEditor.qml"
readonly property string _setupViewSource: "SetupView.qml" readonly property string _setupViewSource: "SetupView.qml"
Connections { Connections {
target: controller target: controller
onShowFlyView: { onShowFlyView: {
setupViewLoader.visible = false flightView.visible = true
planViewLoader.visible = false setupViewLoader.visible = false
_root.hideWidgets = false planViewLoader.visible = false
_root.hideWidgets = false
} }
onShowPlanView: { onShowPlanView: {
if (planViewLoader.source != _planViewSource) { if (planViewLoader.source != _planViewSource) {
planViewLoader.source = _planViewSource planViewLoader.source = _planViewSource
} }
setupViewLoader.visible = false flightView.visible = false
planViewLoader.visible = true setupViewLoader.visible = false
_root.hideWidgets = true planViewLoader.visible = true
_root.hideWidgets = true
} }
onShowSetupView: { onShowSetupView: {
if (setupViewLoader.source != _setupViewSource) { if (setupViewLoader.source != _setupViewSource) {
setupViewLoader.source = _setupViewSource setupViewLoader.source = _setupViewSource
} }
setupViewLoader.visible = true flightView.visible = false
planViewLoader.visible = false setupViewLoader.visible = true
_root.hideWidgets = true planViewLoader.visible = false
_root.hideWidgets = true
} }
onShowToolbarMessage: _toolbar.showToolbarMessage(message) onShowToolbarMessage: _toolbar.showToolbarMessage(message)
...@@ -83,19 +85,30 @@ FlightDisplayView { ...@@ -83,19 +85,30 @@ FlightDisplayView {
} }
Loader { Loader {
id: toolbarLoader id: toolbarLoader
width: parent.width width: parent.width
height: item ? item.height : 0 height: item ? item.height : 0
z: _root.zOrderTopMost 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 { Loader {
id: planViewLoader id: planViewLoader
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: toolbarLoader.bottom anchors.top: toolbarLoader.bottom
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: false visible: false
property real zOrder: _root.zOrderTopMost 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