Commit f8833519 authored by DoinLakeFlyer's avatar DoinLakeFlyer

parent 1887e93d
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
<file alias="QGroundControl/Controls/QGCButton.qml">src/QmlControls/QGCButton.qml</file> <file alias="QGroundControl/Controls/QGCButton.qml">src/QmlControls/QGCButton.qml</file>
<file alias="QGroundControl/Controls/QGCCheckBox.qml">src/QmlControls/QGCCheckBox.qml</file> <file alias="QGroundControl/Controls/QGCCheckBox.qml">src/QmlControls/QGCCheckBox.qml</file>
<file alias="QGroundControl/Controls/QGCColoredImage.qml">src/QmlControls/QGCColoredImage.qml</file> <file alias="QGroundControl/Controls/QGCColoredImage.qml">src/QmlControls/QGCColoredImage.qml</file>
<file alias="QGroundControl/Controls/QGCControlDebug.qml">src/QmlControls/QGCControlDebug.qml</file>
<file alias="QGroundControl/Controls/QGCComboBox.qml">src/QmlControls/QGCComboBox.qml</file> <file alias="QGroundControl/Controls/QGCComboBox.qml">src/QmlControls/QGCComboBox.qml</file>
<file alias="QGroundControl/Controls/QGCFileDialog.qml">src/QmlControls/QGCFileDialog.qml</file> <file alias="QGroundControl/Controls/QGCFileDialog.qml">src/QmlControls/QGCFileDialog.qml</file>
<file alias="QGroundControl/Controls/QGCFlickable.qml">src/QmlControls/QGCFlickable.qml</file> <file alias="QGroundControl/Controls/QGCFlickable.qml">src/QmlControls/QGCFlickable.qml</file>
...@@ -147,7 +148,8 @@ ...@@ -147,7 +148,8 @@
<file alias="QGroundControl/Controls/QGCMovableItem.qml">src/QmlControls/QGCMovableItem.qml</file> <file alias="QGroundControl/Controls/QGCMovableItem.qml">src/QmlControls/QGCMovableItem.qml</file>
<file alias="QGroundControl/Controls/QGCPopupDialog.qml">src/QmlControls/QGCPopupDialog.qml</file> <file alias="QGroundControl/Controls/QGCPopupDialog.qml">src/QmlControls/QGCPopupDialog.qml</file>
<file alias="QGroundControl/Controls/QGCPopupDialogContainer.qml">src/QmlControls/QGCPopupDialogContainer.qml</file> <file alias="QGroundControl/Controls/QGCPopupDialogContainer.qml">src/QmlControls/QGCPopupDialogContainer.qml</file>
<file alias="QGroundControl/Controls/QGCPipable.qml">src/QmlControls/QGCPipable.qml</file> <file alias="QGroundControl/Controls/QGCPipOverlay.qml">src/QmlControls/QGCPipOverlay.qml</file>
<file alias="QGroundControl/Controls/QGCPipState.qml">src/QmlControls/QGCPipState.qml</file>
<file alias="QGroundControl/Controls/QGCRadioButton.qml">src/QmlControls/QGCRadioButton.qml</file> <file alias="QGroundControl/Controls/QGCRadioButton.qml">src/QmlControls/QGCRadioButton.qml</file>
<file alias="QGroundControl/Controls/QGCSlider.qml">src/QmlControls/QGCSlider.qml</file> <file alias="QGroundControl/Controls/QGCSlider.qml">src/QmlControls/QGCSlider.qml</file>
<file alias="QGroundControl/Controls/QGCSwitch.qml">src/QmlControls/QGCSwitch.qml</file> <file alias="QGroundControl/Controls/QGCSwitch.qml">src/QmlControls/QGCSwitch.qml</file>
......
This diff is collapsed.
...@@ -33,15 +33,13 @@ FlightMap { ...@@ -33,15 +33,13 @@ FlightMap {
zoomLevel: QGroundControl.flightMapZoom zoomLevel: QGroundControl.flightMapZoom
center: QGroundControl.flightMapPosition center: QGroundControl.flightMapPosition
property alias scaleState: mapScale.state
// The following properties must be set by the consumer
property var guidedActionsController property var guidedActionsController
property var flightWidgets property var flightWidgets
property var rightPanelWidth property var rightPanelWidth
property var planMasterController property var planMasterController
property alias scaleState: mapScale.state
property rect centerViewport: Qt.rect(0, 0, width, height) property rect centerViewport: Qt.rect(0, 0, width, height)
property bool mainWindowIsMap: true
property var _planMasterController: planMasterController property var _planMasterController: planMasterController
property var _geoFenceController: planMasterController.geoFenceController property var _geoFenceController: planMasterController.geoFenceController
...@@ -53,7 +51,7 @@ FlightMap { ...@@ -53,7 +51,7 @@ FlightMap {
property bool _keepMapCenteredOnVehicle: _flyViewSettings.keepMapCenteredOnVehicle.rawValue property bool _keepMapCenteredOnVehicle: _flyViewSettings.keepMapCenteredOnVehicle.rawValue
property bool _disableVehicleTracking: false property bool _disableVehicleTracking: false
property bool _keepVehicleCentered: mainIsMap ? false : true property bool _keepVehicleCentered: mainWindowIsMap ? false : true
property bool _pipping: false property bool _pipping: false
function updateAirspace(reset) { function updateAirspace(reset) {
...@@ -81,7 +79,7 @@ FlightMap { ...@@ -81,7 +79,7 @@ FlightMap {
} }
function adjustMapSize() { function adjustMapSize() {
if(mainIsMap) if(mainWindowIsMap)
pipOut() pipOut()
else else
pipIn() pipIn()
...@@ -213,7 +211,7 @@ FlightMap { ...@@ -213,7 +211,7 @@ FlightMap {
MapFitFunctions { MapFitFunctions {
id: mapFitFunctions // The name for this id cannot be changed without breaking references outside of this code. Beware! id: mapFitFunctions // The name for this id cannot be changed without breaking references outside of this code. Beware!
map: mainWindow.flightDisplayMap map: flightMap
usePlannedHomePosition: false usePlannedHomePosition: false
planMasterController: _planMasterController planMasterController: _planMasterController
property real leftToolWidth: toolStrip.x + toolStrip.width property real leftToolWidth: toolStrip.x + toolStrip.width
...@@ -225,7 +223,7 @@ FlightMap { ...@@ -225,7 +223,7 @@ FlightMap {
line.width: 3 line.width: 3
line.color: "red" line.color: "red"
z: QGroundControl.zOrderTrajectoryLines z: QGroundControl.zOrderTrajectoryLines
visible: mainIsMap visible: mainWindowIsMap
Connections { Connections {
target: QGroundControl.multiVehicleManager target: QGroundControl.multiVehicleManager
...@@ -247,7 +245,7 @@ FlightMap { ...@@ -247,7 +245,7 @@ FlightMap {
vehicle: object vehicle: object
coordinate: object.coordinate coordinate: object.coordinate
map: flightMap map: flightMap
size: mainIsMap ? ScreenTools.defaultFontPixelHeight * 3 : ScreenTools.defaultFontPixelHeight size: mainWindowIsMap ? ScreenTools.defaultFontPixelHeight * 3 : ScreenTools.defaultFontPixelHeight
z: QGroundControl.zOrderVehicles z: QGroundControl.zOrderVehicles
} }
} }
...@@ -272,7 +270,7 @@ FlightMap { ...@@ -272,7 +270,7 @@ FlightMap {
PlanMapItems { PlanMapItems {
map: flightMap map: flightMap
largeMapView: mainIsMap largeMapView: mainWindowIsMap
planMasterController: _planMasterController planMasterController: _planMasterController
vehicle: _vehicle vehicle: _vehicle
...@@ -286,7 +284,7 @@ FlightMap { ...@@ -286,7 +284,7 @@ FlightMap {
} }
MapItemView { MapItemView {
model: mainIsMap ? _missionController.directionArrows : undefined model: mainWindowIsMap ? _missionController.directionArrows : undefined
delegate: MapLineArrow { delegate: MapLineArrow {
fromCoord: object ? object.coordinate1 : undefined fromCoord: object ? object.coordinate1 : undefined
...@@ -299,7 +297,7 @@ FlightMap { ...@@ -299,7 +297,7 @@ FlightMap {
// Allow custom builds to add map items // Allow custom builds to add map items
CustomMapItems { CustomMapItems {
map: flightMap map: flightMap
largeMapView: mainIsMap largeMapView: mainWindowIsMap
} }
GeoFenceMapVisuals { GeoFenceMapVisuals {
...@@ -556,7 +554,7 @@ FlightMap { ...@@ -556,7 +554,7 @@ FlightMap {
anchors.topMargin: _toolsMargin + state === "bottomMode" ? 0 : ScreenTools.toolbarHeight anchors.topMargin: _toolsMargin + state === "bottomMode" ? 0 : ScreenTools.toolbarHeight
mapControl: flightMap mapControl: flightMap
buttonsOnLeft: false buttonsOnLeft: false
visible: !ScreenTools.isTinyScreen && QGroundControl.corePlugin.options.enableMapScale && mainIsMap visible: !ScreenTools.isTinyScreen && QGroundControl.corePlugin.options.enableMapScale && mainWindowIsMap
state: "bottomMode" state: "bottomMode"
states: [ states: [
State { State {
......
...@@ -23,6 +23,9 @@ import QGroundControl.Controllers 1.0 ...@@ -23,6 +23,9 @@ import QGroundControl.Controllers 1.0
Item { Item {
id: root id: root
clip: true clip: true
property bool useSmallFont: true
property double _ar: QGroundControl.videoManager.aspectRatio property double _ar: QGroundControl.videoManager.aspectRatio
property bool _showGrid: QGroundControl.settingsManager.videoSettings.gridLines.rawValue > 0 property bool _showGrid: QGroundControl.settingsManager.videoSettings.gridLines.rawValue > 0
property var _dynamicCameras: activeVehicle ? activeVehicle.dynamicCameras : null property var _dynamicCameras: activeVehicle ? activeVehicle.dynamicCameras : null
...@@ -44,7 +47,7 @@ Item { ...@@ -44,7 +47,7 @@ Item {
text: QGroundControl.settingsManager.videoSettings.streamEnabled.rawValue ? qsTr("WAITING FOR VIDEO") : qsTr("VIDEO DISABLED") text: QGroundControl.settingsManager.videoSettings.streamEnabled.rawValue ? qsTr("WAITING FOR VIDEO") : qsTr("VIDEO DISABLED")
font.family: ScreenTools.demiboldFontFamily font.family: ScreenTools.demiboldFontFamily
color: "white" color: "white"
font.pointSize: mainIsMap ? ScreenTools.smallFontPointSize : ScreenTools.largeFontPointSize font.pointSize: useSmallFont ? ScreenTools.smallFontPointSize : ScreenTools.largeFontPointSize
anchors.centerIn: parent anchors.centerIn: parent
} }
MouseArea { MouseArea {
......
...@@ -33,15 +33,12 @@ Item { ...@@ -33,15 +33,12 @@ Item {
property var missionController property var missionController
property bool showValues: !QGroundControl.airspaceManager.airspaceVisible property bool showValues: !QGroundControl.airspaceManager.airspaceVisible
property bool _isSatellite: mainIsMap ? (mainWindow.flightDisplayMap ? mainWindow.flightDisplayMap.isSatelliteMap : true) : true property bool _lightWidgetBorders: true
property bool _lightWidgetBorders: _isSatellite
property bool _airspaceEnabled: QGroundControl.airmapSupported ? QGroundControl.settingsManager.airMapSettings.enableAirMap.rawValue : false property bool _airspaceEnabled: QGroundControl.airmapSupported ? QGroundControl.settingsManager.airMapSettings.enableAirMap.rawValue : false
readonly property real _margins: ScreenTools.defaultFontPixelHeight * 0.5 readonly property real _margins: ScreenTools.defaultFontPixelHeight * 0.5
readonly property bool _useAlternateInstrumentPanel: QGroundControl.settingsManager.flyViewSettings.alternateInstrumentPanel.value readonly property bool _useAlternateInstrumentPanel: QGroundControl.settingsManager.flyViewSettings.alternateInstrumentPanel.value
QGCMapPalette { id: mapPal; lightColors: useLightColors }
function getPreferredInstrumentWidth() { function getPreferredInstrumentWidth() {
// Don't allow instrument panel to chew more than 1/4 of full window // Don't allow instrument panel to chew more than 1/4 of full window
var defaultWidth = ScreenTools.defaultFontPixelWidth * 30 var defaultWidth = ScreenTools.defaultFontPixelWidth * 30
......
...@@ -43,7 +43,7 @@ ColumnLayout { ...@@ -43,7 +43,7 @@ ColumnLayout {
radius: _outerRadius radius: _outerRadius
color: qgcPal.window color: qgcPal.window
border.width: 1 border.width: 1
border.color: _isSatellite ? qgcPal.mapWidgetBorderLight : qgcPal.mapWidgetBorderDark border.color: qgcPal.mapWidgetBorderLight
DeadMouseArea { anchors.fill: parent } DeadMouseArea { anchors.fill: parent }
......
/****************************************************************************
*
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.12
Item {
property string name: "control"
Connections {
target: parent
onXChanged: console.log(name, "xChanged", parent.x)
onYChanged: console.log(name, "yChanged", parent.y)
onWidthChanged: console.log(name, "widthChanged", parent.width)
onHeightChanged: console.log(name, "heightChanged", parent.height)
onVisibleChanged: console.log(name, "visibleChanged", parent.visible)
onZChanged: console.log(name, "zChanged", parent.z)
onParentChanged: console.log(name, "parentChanged", parent.parent)
}
}
/****************************************************************************
*
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.12
// Used to manage state for itesm using with QGCPipOveral
Item {
id: _root
state: initState
readonly property string initState: "init"
readonly property string pipState: "pip"
readonly property string fullState: "full"
readonly property string windowState: "window"
readonly property string windowClosingState: "windowClosing"
property var pipOverlay // QGCPipOverlay control
property bool isDark: true // true: Use dark overlay visuals
signal windowAboutToOpen // Catch this signal to do something special prior to the item transition to windowed mode
signal windowAboutToClose // Catch this signal to do special processing prior to the item transition back to pip mode
property var _clientControl: _root.parent
states: [
State {
name: pipState
AnchorChanges {
target: _clientControl
anchors.top: pipOverlay.top
anchors.bottom: pipOverlay.bottom
anchors.left: pipOverlay.left
anchors.right: pipOverlay.right
}
PropertyChanges {
target: _clientControl
z: pipOverlay.pipZOrder
}
},
State {
name: fullState
AnchorChanges {
target: _clientControl
anchors.top: pipOverlay.parent.top
anchors.bottom: pipOverlay.parent.bottom
anchors.left: pipOverlay.parent.left
anchors.right: pipOverlay.parent.right
}
PropertyChanges {
target: _clientControl
z: pipOverlay.fullZOrder
}
},
State {
name: windowState
AnchorChanges {
target: _root.parent
anchors.top: pipOverlay._windowContentItem.top
anchors.bottom: pipOverlay._windowContentItem.bottom
anchors.left: pipOverlay._windowContentItem.left
anchors.right: pipOverlay._windowContentItem.right
}
ParentChange {
target: _root.parent
parent: pipOverlay._windowContentItem
}
StateChangeScript {
script: {
_root.windowAboutToOpen()
pipOverlay.showWindow()
}
}
},
State {
name: windowClosingState
ParentChange {
target: _root.parent
parent: pipOverlay.parent
}
}
]
}
...@@ -50,6 +50,7 @@ QGCButton 1.0 QGCButton.qml ...@@ -50,6 +50,7 @@ QGCButton 1.0 QGCButton.qml
QGCCheckBox 1.0 QGCCheckBox.qml QGCCheckBox 1.0 QGCCheckBox.qml
QGCColoredImage 1.0 QGCColoredImage.qml QGCColoredImage 1.0 QGCColoredImage.qml
QGCComboBox 1.0 QGCComboBox.qml QGCComboBox 1.0 QGCComboBox.qml
QGCControlDebug 1.0 QGCControlDebug.qml
QGCDynamicObjectManager 1.0 QGCDynamicObjectManager.qml QGCDynamicObjectManager 1.0 QGCDynamicObjectManager.qml
QGCFileDialog 1.0 QGCFileDialog.qml QGCFileDialog 1.0 QGCFileDialog.qml
QGCFlickable 1.0 QGCFlickable.qml QGCFlickable 1.0 QGCFlickable.qml
...@@ -66,7 +67,8 @@ QGCMenuSeparator 1.0 QGCMenuSeparator.qml ...@@ -66,7 +67,8 @@ QGCMenuSeparator 1.0 QGCMenuSeparator.qml
QGCMouseArea 1.0 QGCMouseArea.qml QGCMouseArea 1.0 QGCMouseArea.qml
QGCMovableItem 1.0 QGCMovableItem.qml QGCMovableItem 1.0 QGCMovableItem.qml
QGCOptionsComboBox 1.0 QGCOptionsComboBox.qml QGCOptionsComboBox 1.0 QGCOptionsComboBox.qml
QGCPipable 1.0 QGCPipable.qml QGCPipOverlay 1.0 QGCPipOverlay.qml
QGCPipState 1.0 QGCPipState.qml
QGCPopupDialog 1.0 QGCPopupDialog.qml QGCPopupDialog 1.0 QGCPopupDialog.qml
QGCPopupDialogContainer 1.0 QGCPopupDialogContainer.qml QGCPopupDialogContainer 1.0 QGCPopupDialogContainer.qml
QGCRadioButton 1.0 QGCRadioButton.qml QGCRadioButton 1.0 QGCRadioButton.qml
......
...@@ -68,7 +68,6 @@ ApplicationWindow { ...@@ -68,7 +68,6 @@ ApplicationWindow {
property var currentPlanMissionItem: planMasterControllerPlan ? planMasterControllerPlan.missionController.currentPlanViewItem : null property var currentPlanMissionItem: planMasterControllerPlan ? planMasterControllerPlan.missionController.currentPlanViewItem : null
property var planMasterControllerPlan: null property var planMasterControllerPlan: null
property var planMasterControllerView: null property var planMasterControllerView: null
property var flightDisplayMap: null
readonly property string navButtonWidth: ScreenTools.defaultFontPixelWidth * 24 readonly property string navButtonWidth: ScreenTools.defaultFontPixelWidth * 24
readonly property real defaultTextHeight: ScreenTools.defaultFontPixelHeight readonly property real defaultTextHeight: ScreenTools.defaultFontPixelHeight
......
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