@ -1,159 +0,0 @@
@@ -1,159 +0,0 @@
|
||||
/*===================================================================== |
||||
|
||||
QGroundControl Open Source Ground Control Station |
||||
|
||||
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> |
||||
|
||||
This file is part of the QGROUNDCONTROL project |
||||
|
||||
QGROUNDCONTROL is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
QGROUNDCONTROL is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
======================================================================*/ |
||||
|
||||
import QtQuick 2.4 |
||||
import QtQuick.Controls 1.3 |
||||
import QtQuick.Controls.Styles 1.2 |
||||
import QtQuick.Dialogs 1.2 |
||||
import QtLocation 5.3 |
||||
import QtPositioning 5.2 |
||||
|
||||
import QGroundControl 1.0 |
||||
import QGroundControl.ScreenTools 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
import QGroundControl.Palette 1.0 |
||||
import QGroundControl.Vehicle 1.0 |
||||
import QGroundControl.FlightMap 1.0 |
||||
|
||||
/// This component is used to delay load the controls which are children of the inner FlightMap |
||||
/// control of FlightDisplayView. |
||||
// Vehicle GPS lock display |
||||
Item { |
||||
Column { |
||||
id: gpsLockColumn |
||||
y: (parent.height - height) / 2 |
||||
width: parent.width |
||||
|
||||
Repeater { |
||||
model: multiVehicleManager.vehicles |
||||
|
||||
delegate: |
||||
QGCLabel { |
||||
width: gpsLockColumn.width |
||||
horizontalAlignment: Text.AlignHCenter |
||||
visible: !object.coordinateValid |
||||
text: "No GPS Lock for Vehicle #" + object.id |
||||
z: QGroundControl.zOrderMapItems - 2 |
||||
} |
||||
} |
||||
} |
||||
|
||||
QGCCompassWidget { |
||||
anchors.leftMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.topMargin: topMargin |
||||
anchors.left: parent.left |
||||
anchors.top: parent.top |
||||
size: ScreenTools.defaultFontPixelSize * (13.3) |
||||
heading: _heading |
||||
z: QGroundControl.zOrderWidgets |
||||
} |
||||
|
||||
QGCAttitudeWidget { |
||||
anchors.margins: ScreenTools.defaultFontPixelHeight |
||||
anchors.left: parent.left |
||||
anchors.bottom: parent.bottom |
||||
size: ScreenTools.defaultFontPixelSize * (13.3) |
||||
rollAngle: _roll |
||||
pitchAngle: _pitch |
||||
active: multiVehicleManager.activeVehicleAvailable |
||||
z: QGroundControl.zOrderWidgets |
||||
} |
||||
|
||||
DropButton { |
||||
id: centerMapDropButton |
||||
anchors.rightMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.right: mapTypeButton.left |
||||
anchors.top: mapTypeButton.top |
||||
dropDirection: dropDown |
||||
buttonImage: "/qmlimages/MapCenter.svg" |
||||
viewportMargins: ScreenTools.defaultFontPixelWidth / 2 |
||||
exclusiveGroup: _dropButtonsExclusiveGroup |
||||
z: QGroundControl.zOrderWidgets |
||||
|
||||
dropDownComponent: Component { |
||||
Row { |
||||
spacing: ScreenTools.defaultFontPixelWidth |
||||
|
||||
QGCCheckBox { |
||||
id: followVehicleCheckBox |
||||
text: "Follow Vehicle" |
||||
checked: flightMap._followVehicle |
||||
anchors.baseline: centerMapButton.baseline |
||||
|
||||
onClicked: { |
||||
centerMapDropButton.hideDropDown() |
||||
flightMap._followVehicle = !flightMap._followVehicle |
||||
} |
||||
} |
||||
|
||||
QGCButton { |
||||
id: centerMapButton |
||||
text: "Center map on Vehicle" |
||||
enabled: _activeVehicle && !followVehicleCheckBox.checked |
||||
|
||||
property var activeVehicle: multiVehicleManager.activeVehicle |
||||
|
||||
onClicked: { |
||||
centerMapDropButton.hideDropDown() |
||||
flightMap.latitude = activeVehicle.latitude |
||||
flightMap.longitude = activeVehicle.longitude |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
DropButton { |
||||
id: mapTypeButton |
||||
anchors.topMargin: topMargin |
||||
anchors.rightMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.top: parent.top |
||||
anchors.right: parent.right |
||||
dropDirection: dropDown |
||||
buttonImage: "/qmlimages/MapType.svg" |
||||
viewportMargins: ScreenTools.defaultFontPixelWidth / 2 |
||||
exclusiveGroup: _dropButtonsExclusiveGroup |
||||
z: QGroundControl.zOrderWidgets |
||||
|
||||
dropDownComponent: Component { |
||||
Row { |
||||
spacing: ScreenTools.defaultFontPixelWidth |
||||
|
||||
Repeater { |
||||
model: QGroundControl.flightMapSettings.mapTypes |
||||
|
||||
QGCButton { |
||||
checkable: true |
||||
checked: flightMap.mapType == text |
||||
text: modelData |
||||
|
||||
onClicked: { |
||||
flightMap.mapType = text |
||||
mapTypeButton.hideDropDown() |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
@ -1,145 +0,0 @@
@@ -1,145 +0,0 @@
|
||||
/*===================================================================== |
||||
|
||||
QGroundControl Open Source Ground Control Station |
||||
|
||||
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> |
||||
|
||||
This file is part of the QGROUNDCONTROL project |
||||
|
||||
QGROUNDCONTROL is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
QGROUNDCONTROL is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
======================================================================*/ |
||||
|
||||
import QtQuick 2.4 |
||||
import QtQuick.Controls 1.3 |
||||
import QtQuick.Controls.Styles 1.2 |
||||
import QtQuick.Dialogs 1.2 |
||||
import QtLocation 5.3 |
||||
import QtPositioning 5.2 |
||||
|
||||
import QGroundControl 1.0 |
||||
import QGroundControl.ScreenTools 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
import QGroundControl.Palette 1.0 |
||||
import QGroundControl.Vehicle 1.0 |
||||
import QGroundControl.FlightMap 1.0 |
||||
|
||||
/// This component is used to delay load the items which are direct children of the |
||||
/// FlightDisplayViewControl. |
||||
Item { |
||||
QGCVideoBackground { |
||||
anchors.fill: parent |
||||
display: _controller.videoSurface |
||||
receiver: _controller.videoReceiver |
||||
visible: !_showMap |
||||
|
||||
QGCCompassHUD { |
||||
id: compassHUD |
||||
y: root.height * 0.7 |
||||
x: root.width * 0.5 - ScreenTools.defaultFontPixelSize * (5) |
||||
width: ScreenTools.defaultFontPixelSize * (10) |
||||
height: ScreenTools.defaultFontPixelSize * (10) |
||||
heading: _heading |
||||
active: multiVehicleManager.activeVehicleAvailable |
||||
z: QGroundControl.zOrderWidgets |
||||
} |
||||
|
||||
QGCAttitudeHUD { |
||||
id: attitudeHUD |
||||
rollAngle: _roll |
||||
pitchAngle: _pitch |
||||
width: ScreenTools.defaultFontPixelSize * (30) |
||||
height: ScreenTools.defaultFontPixelSize * (30) |
||||
active: multiVehicleManager.activeVehicleAvailable |
||||
z: QGroundControl.zOrderWidgets |
||||
} |
||||
} |
||||
|
||||
QGCAltitudeWidget { |
||||
anchors.right: parent.right |
||||
height: parent.height * 0.65 > ScreenTools.defaultFontPixelSize * (23.4) ? ScreenTools.defaultFontPixelSize * (23.4) : parent.height * 0.65 |
||||
width: ScreenTools.defaultFontPixelSize * (5) |
||||
altitude: _altitudeWGS84 |
||||
z: QGroundControl.zOrderWidgets |
||||
visible: !hideWidgets |
||||
} |
||||
|
||||
QGCSpeedWidget { |
||||
anchors.left: parent.left |
||||
width: ScreenTools.defaultFontPixelSize * (5) |
||||
height: parent.height * 0.65 > ScreenTools.defaultFontPixelSize * (23.4) ? ScreenTools.defaultFontPixelSize * (23.4) : parent.height * 0.65 |
||||
speed: _groundSpeed |
||||
z: QGroundControl.zOrderWidgets |
||||
visible: !hideWidgets |
||||
} |
||||
|
||||
QGCCurrentSpeed { |
||||
anchors.left: parent.left |
||||
width: ScreenTools.defaultFontPixelSize * (6.25) |
||||
airspeed: _airSpeed |
||||
groundspeed: _groundSpeed |
||||
active: multiVehicleManager.activeVehicleAvailable |
||||
z: QGroundControl.zOrderWidgets |
||||
visible: !hideWidgets |
||||
} |
||||
|
||||
QGCCurrentAltitude { |
||||
anchors.right: parent.right |
||||
width: ScreenTools.defaultFontPixelSize * (6.25) |
||||
altitude: _altitudeWGS84 |
||||
vertZ: _climbRate |
||||
active: multiVehicleManager.activeVehicleAvailable |
||||
z: QGroundControl.zOrderWidgets |
||||
visible: !hideWidgets |
||||
} |
||||
|
||||
QGCButton { |
||||
id: optionsButton |
||||
x: _flightMap.mapWidgets.x |
||||
y: _flightMap.mapWidgets.y - height - (ScreenTools.defaultFontPixelHeight / 2) |
||||
z: QGroundControl.zOrderWidgets |
||||
width: _flightMap.mapWidgets.width |
||||
text: "Options" |
||||
menu: optionsMenu |
||||
visible: _controller.hasVideo && !hideWidgets |
||||
|
||||
ExclusiveGroup { |
||||
id: backgroundTypeGroup |
||||
} |
||||
|
||||
Menu { |
||||
id: optionsMenu |
||||
|
||||
MenuItem { |
||||
id: mapBackgroundMenuItem |
||||
exclusiveGroup: backgroundTypeGroup |
||||
checkable: true |
||||
checked: _showMap |
||||
text: "Show map as background" |
||||
|
||||
onTriggered: _setShowMap(true) |
||||
} |
||||
|
||||
MenuItem { |
||||
id: videoBackgroundMenuItem |
||||
exclusiveGroup: backgroundTypeGroup |
||||
checkable: true |
||||
checked: !_showMap |
||||
text: "Show video as background" |
||||
|
||||
onTriggered: _setShowMap(false) |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,111 @@
@@ -0,0 +1,111 @@
|
||||
/*===================================================================== |
||||
|
||||
QGroundControl Open Source Ground Control Station |
||||
|
||||
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> |
||||
|
||||
This file is part of the QGROUNDCONTROL project |
||||
|
||||
QGROUNDCONTROL is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
QGROUNDCONTROL is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
======================================================================*/ |
||||
|
||||
import QtQuick 2.4 |
||||
import QtQuick.Controls 1.3 |
||||
import QtLocation 5.3 |
||||
import QtPositioning 5.2 |
||||
|
||||
import QGroundControl 1.0 |
||||
import QGroundControl.FlightDisplay 1.0 |
||||
import QGroundControl.FlightMap 1.0 |
||||
import QGroundControl.ScreenTools 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
import QGroundControl.Palette 1.0 |
||||
import QGroundControl.Vehicle 1.0 |
||||
import QGroundControl.Controllers 1.0 |
||||
|
||||
FlightMap { |
||||
id: flightMap |
||||
anchors.fill: parent |
||||
mapName: _mapName |
||||
latitude: root._defaultCoordinate.latitude |
||||
longitude: root._defaultCoordinate.longitude |
||||
|
||||
property var rootVehicleCoordinate: _vehicleCoordinate |
||||
property bool _followVehicle: true |
||||
|
||||
onRootVehicleCoordinateChanged: updateMapPosition(false /* force */) |
||||
|
||||
function updateMapPosition(force) { |
||||
if (_followVehicle || force) { |
||||
flightMap.latitude = root._vehicleCoordinate.latitude |
||||
flightMap.longitude = root._vehicleCoordinate.longitude |
||||
} |
||||
} |
||||
|
||||
// Home position |
||||
MissionItemIndicator { |
||||
label: "H" |
||||
coordinate: (_activeVehicle && _activeVehicle.homePositionAvailable) ? _activeVehicle.homePosition : QtPositioning.coordinate(0, 0) |
||||
visible: { |
||||
if(!_mainIsMap) |
||||
return false; |
||||
return _activeVehicle ? _activeVehicle.homePositionAvailable : false |
||||
} |
||||
z: QGroundControl.zOrderMapItems |
||||
} |
||||
|
||||
// Add trajectory points to the map |
||||
MapItemView { |
||||
model: _mainIsMap ? multiVehicleManager.activeVehicle ? multiVehicleManager.activeVehicle.trajectoryPoints : 0 : 0 |
||||
delegate: |
||||
MapPolyline { |
||||
line.width: 3 |
||||
line.color: "orange" |
||||
z: QGroundControl.zOrderMapItems - 1 |
||||
path: [ |
||||
{ latitude: object.coordinate1.latitude, longitude: object.coordinate1.longitude }, |
||||
{ latitude: object.coordinate2.latitude, longitude: object.coordinate2.longitude }, |
||||
] |
||||
} |
||||
} |
||||
|
||||
// Add the vehicles to the map |
||||
MapItemView { |
||||
model: multiVehicleManager.vehicles |
||||
delegate: |
||||
VehicleMapItem { |
||||
vehicle: object |
||||
coordinate: object.coordinate |
||||
isSatellite: flightMap.isSatelliteMap |
||||
size: _mainIsMap ? ScreenTools.defaultFontPixelHeight * 5 : ScreenTools.defaultFontPixelHeight * 2 |
||||
z: QGroundControl.zOrderMapItems |
||||
} |
||||
} |
||||
|
||||
// Add the mission items to the map |
||||
MissionItemView { |
||||
model: _mainIsMap ? _missionController.missionItems : 0 |
||||
} |
||||
|
||||
// Add lines between waypoints |
||||
MissionLineView { |
||||
model: _mainIsMap ? _missionController.waypointLines : 0 |
||||
} |
||||
|
||||
// Used to make pinch zoom work |
||||
MouseArea { |
||||
anchors.fill: parent |
||||
} |
||||
} |
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
/*===================================================================== |
||||
|
||||
QGroundControl Open Source Ground Control Station |
||||
|
||||
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> |
||||
|
||||
This file is part of the QGROUNDCONTROL project |
||||
|
||||
QGROUNDCONTROL is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
QGROUNDCONTROL is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
======================================================================*/ |
||||
|
||||
import QtQuick 2.4 |
||||
import QtQuick.Controls 1.3 |
||||
|
||||
import QGroundControl 1.0 |
||||
import QGroundControl.FlightDisplay 1.0 |
||||
import QGroundControl.FlightMap 1.0 |
||||
import QGroundControl.ScreenTools 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
import QGroundControl.Palette 1.0 |
||||
import QGroundControl.Vehicle 1.0 |
||||
import QGroundControl.Controllers 1.0 |
||||
|
||||
|
||||
QGCVideoBackground { |
||||
anchors.fill: parent |
||||
display: _controller.videoSurface |
||||
receiver: _controller.videoReceiver |
||||
|
||||
/* TODO: Come up with a way to make this an option |
||||
QGCAttitudeHUD { |
||||
id: attitudeHUD |
||||
visible: !_mainIsMap |
||||
rollAngle: _roll |
||||
pitchAngle: _pitch |
||||
width: ScreenTools.defaultFontPixelSize * (30) |
||||
height: ScreenTools.defaultFontPixelSize * (30) |
||||
active: multiVehicleManager.activeVehicleAvailable |
||||
z: QGroundControl.zOrderWidgets |
||||
} |
||||
*/ |
||||
|
||||
} |
@ -0,0 +1,202 @@
@@ -0,0 +1,202 @@
|
||||
/*===================================================================== |
||||
|
||||
QGroundControl Open Source Ground Control Station |
||||
|
||||
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> |
||||
|
||||
This file is part of the QGROUNDCONTROL project |
||||
|
||||
QGROUNDCONTROL is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
QGROUNDCONTROL is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
======================================================================*/ |
||||
|
||||
import QtQuick 2.4 |
||||
import QtQuick.Controls 1.3 |
||||
import QtQuick.Controls.Styles 1.2 |
||||
import QtQuick.Dialogs 1.2 |
||||
import QtLocation 5.3 |
||||
import QtPositioning 5.2 |
||||
|
||||
import QGroundControl 1.0 |
||||
import QGroundControl.ScreenTools 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
import QGroundControl.Palette 1.0 |
||||
import QGroundControl.Vehicle 1.0 |
||||
import QGroundControl.FlightMap 1.0 |
||||
|
||||
/// This component is used to delay load the items which are direct children of the |
||||
/// FlightDisplayViewControl. |
||||
Item { |
||||
|
||||
ExclusiveGroup { |
||||
id: _dropButtonsExclusiveGroup |
||||
} |
||||
|
||||
//-- Vehicle GPS lock display |
||||
Column { |
||||
id: gpsLockColumn |
||||
y: (parent.height - height) / 2 |
||||
width: parent.width |
||||
|
||||
Repeater { |
||||
model: multiVehicleManager.vehicles |
||||
|
||||
delegate: |
||||
QGCLabel { |
||||
width: gpsLockColumn.width |
||||
horizontalAlignment: Text.AlignHCenter |
||||
visible: !object.coordinateValid |
||||
text: "No GPS Lock for Vehicle #" + object.id |
||||
z: QGroundControl.zOrderMapItems - 2 |
||||
} |
||||
} |
||||
} |
||||
|
||||
//-- Dismiss Drop Down (if any) |
||||
MouseArea { |
||||
anchors.fill: parent |
||||
enabled: _dropButtonsExclusiveGroup.current != null |
||||
onClicked: { |
||||
if(_dropButtonsExclusiveGroup.current) |
||||
_dropButtonsExclusiveGroup.current.checked = false |
||||
_dropButtonsExclusiveGroup.current = null |
||||
} |
||||
} |
||||
|
||||
//-- Instrument Pannel |
||||
QGCInstrumentWidget { |
||||
anchors.margins: ScreenTools.defaultFontPixelHeight |
||||
anchors.bottom: parent.bottom |
||||
anchors.right: parent.right |
||||
size: ScreenTools.defaultFontPixelSize * (9) |
||||
active: _activeVehicle != null |
||||
heading: _heading |
||||
rollAngle: _roll |
||||
pitchAngle: _pitch |
||||
isSatellite: _mainIsMap ? _flightMap ? _flightMap.isSatelliteMap : true : true |
||||
z: QGroundControl.zOrderWidgets |
||||
} |
||||
|
||||
//-- Vertical Tool Buttons |
||||
Column { |
||||
id: toolColumn |
||||
anchors.margins: ScreenTools.defaultFontPixelHeight |
||||
anchors.left: parent.left |
||||
anchors.top: parent.top |
||||
spacing: ScreenTools.defaultFontPixelHeight |
||||
|
||||
//-- Map Center Control |
||||
DropButton { |
||||
id: centerMapDropButton |
||||
dropDirection: dropRight |
||||
buttonImage: "/qmlimages/MapCenter.svg" |
||||
viewportMargins: ScreenTools.defaultFontPixelWidth / 2 |
||||
exclusiveGroup: _dropButtonsExclusiveGroup |
||||
z: QGroundControl.zOrderWidgets |
||||
|
||||
dropDownComponent: Component { |
||||
Row { |
||||
spacing: ScreenTools.defaultFontPixelWidth |
||||
|
||||
QGCCheckBox { |
||||
id: followVehicleCheckBox |
||||
text: "Follow Vehicle" |
||||
checked: _flightMap ? _flightMap._followVehicle : false |
||||
anchors.baseline: centerMapButton.baseline |
||||
|
||||
onClicked: { |
||||
_dropButtonsExclusiveGroup.current = null |
||||
_flightMap._followVehicle = !_flightMap._followVehicle |
||||
} |
||||
} |
||||
|
||||
QGCButton { |
||||
id: centerMapButton |
||||
text: "Center map on Vehicle" |
||||
enabled: _activeVehicle && !followVehicleCheckBox.checked |
||||
|
||||
property var activeVehicle: multiVehicleManager.activeVehicle |
||||
|
||||
onClicked: { |
||||
_dropButtonsExclusiveGroup.current = null |
||||
_flightMap.latitude = activeVehicle.latitude |
||||
_flightMap.longitude = activeVehicle.longitude |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
//-- Map Type Control |
||||
DropButton { |
||||
id: mapTypeButton |
||||
dropDirection: dropRight |
||||
buttonImage: "/qmlimages/MapType.svg" |
||||
viewportMargins: ScreenTools.defaultFontPixelWidth / 2 |
||||
exclusiveGroup: _dropButtonsExclusiveGroup |
||||
z: QGroundControl.zOrderWidgets |
||||
|
||||
dropDownComponent: Component { |
||||
Row { |
||||
spacing: ScreenTools.defaultFontPixelWidth |
||||
|
||||
Repeater { |
||||
model: QGroundControl.flightMapSettings.mapTypes |
||||
|
||||
QGCButton { |
||||
checkable: true |
||||
checked: _flightMap ? _flightMap.mapType == text : false |
||||
text: modelData |
||||
|
||||
onClicked: { |
||||
_flightMap.mapType = text |
||||
_dropButtonsExclusiveGroup.current = null |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
//-- Zoom Map In |
||||
RoundButton { |
||||
id: mapZoomPlus |
||||
visible: _mainIsMap |
||||
buttonImage: "/qmlimages/ZoomPlus.svg" |
||||
exclusiveGroup: _dropButtonsExclusiveGroup |
||||
z: QGroundControl.zOrderWidgets |
||||
onClicked: { |
||||
if(_flightMap) |
||||
_flightMap.zoomLevel += 0.5 |
||||
checked = false |
||||
} |
||||
} |
||||
|
||||
//-- Zoom Map Out |
||||
RoundButton { |
||||
id: mapZoomMinus |
||||
visible: _mainIsMap |
||||
buttonImage: "/qmlimages/ZoomMinus.svg" |
||||
exclusiveGroup: _dropButtonsExclusiveGroup |
||||
z: QGroundControl.zOrderWidgets |
||||
onClicked: { |
||||
if(_flightMap) |
||||
_flightMap.zoomLevel -= 0.5 |
||||
checked = false |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
@ -1,6 +1,4 @@
@@ -1,6 +1,4 @@
|
||||
Module QGroundControl.FlightDisplay |
||||
|
||||
FlightDisplayView 1.0 FlightDisplayView.qml |
||||
FlightDisplayViewDelayLoadInner 1.0 FlightDisplayViewDelayLoadInner.qml |
||||
FlightDisplayViewDelayLoadOuter 1.0 FlightDisplayViewDelayLoadOuter.qml |
||||
FlightDisplayView 1.0 FlightDisplayView.qml |
||||
|
||||
|
Before Width: | Height: | Size: 780 B After Width: | Height: | Size: 885 B |
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 781 B |
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 582 B |
Before Width: | Height: | Size: 990 B After Width: | Height: | Size: 741 B |
Before Width: | Height: | Size: 989 B After Width: | Height: | Size: 742 B |
@ -0,0 +1,112 @@
@@ -0,0 +1,112 @@
|
||||
/*===================================================================== |
||||
|
||||
QGroundControl Open Source Ground Control Station |
||||
|
||||
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> |
||||
|
||||
This file is part of the QGROUNDCONTROL project |
||||
|
||||
QGROUNDCONTROL is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
QGROUNDCONTROL is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
======================================================================*/ |
||||
|
||||
/** |
||||
* @file |
||||
* @brief QGC Compass Widget |
||||
* @author Gus Grubba <mavlink@grubba.com> |
||||
*/ |
||||
|
||||
import QtQuick 2.4 |
||||
|
||||
import QGroundControl.Controls 1.0 |
||||
import QGroundControl.ScreenTools 1.0 |
||||
|
||||
Item { |
||||
id: root |
||||
height: size |
||||
|
||||
property alias heading: compass.heading |
||||
property alias rollAngle: attitude.rollAngle |
||||
property alias pitchAngle: attitude.pitchAngle |
||||
|
||||
property real size: ScreenTools.defaultFontPixelSize * (10) |
||||
property bool isSatellite: false |
||||
property bool active: false |
||||
|
||||
property bool _isVisible: true |
||||
|
||||
//-- Instrument Pannel |
||||
Rectangle { |
||||
id: instrumentPannel |
||||
anchors.right: parent.right |
||||
anchors.bottom: parent.bottom |
||||
height: root.size |
||||
width: instruments.width + ScreenTools.defaultFontPixelSize |
||||
radius: root.size / 2 |
||||
visible: _isVisible |
||||
color: isSatellite ? Qt.rgba(1,1,1,0.5) : Qt.rgba(0,0,0,0.5) |
||||
Row { |
||||
id: instruments |
||||
height: parent.height |
||||
spacing: ScreenTools.defaultFontPixelSize / 2 |
||||
anchors.horizontalCenter: parent.horizontalCenter |
||||
QGCAttitudeWidget { |
||||
id: attitude |
||||
size: parent.height * 0.9 |
||||
active: root.active |
||||
anchors.verticalCenter: parent.verticalCenter |
||||
} |
||||
QGCCompassWidget { |
||||
id: compass |
||||
size: parent.height * 0.9 |
||||
active: root.active |
||||
anchors.verticalCenter: parent.verticalCenter |
||||
} |
||||
} |
||||
MouseArea { |
||||
anchors.fill: parent |
||||
onClicked: { |
||||
_isVisible = !_isVisible |
||||
} |
||||
} |
||||
} |
||||
|
||||
//-- Show Instruments |
||||
Rectangle { |
||||
id: openButton |
||||
anchors.right: parent.right |
||||
anchors.bottom: parent.bottom |
||||
height: ScreenTools.defaultFontPixelSize * 2 |
||||
width: ScreenTools.defaultFontPixelSize * 2 |
||||
radius: ScreenTools.defaultFontPixelSize / 3 |
||||
visible: !_isVisible |
||||
color: isSatellite ? Qt.rgba(1,1,1,0.5) : Qt.rgba(0,0,0,0.5) |
||||
Image { |
||||
width: parent.width * 0.75 |
||||
height: parent.height * 0.75 |
||||
source: "/qmlimages/buttonLeft.svg" |
||||
mipmap: true |
||||
fillMode: Image.PreserveAspectFit |
||||
anchors.verticalCenter: parent.verticalCenter |
||||
anchors.horizontalCenter: parent.horizontalCenter |
||||
} |
||||
MouseArea { |
||||
anchors.fill: parent |
||||
onClicked: { |
||||
_isVisible = !_isVisible |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,225 @@
@@ -0,0 +1,225 @@
|
||||
/*===================================================================== |
||||
|
||||
QGroundControl Open Source Ground Control Station |
||||
|
||||
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> |
||||
|
||||
This file is part of the QGROUNDCONTROL project |
||||
|
||||
QGROUNDCONTROL is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
QGROUNDCONTROL is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
======================================================================*/ |
||||
|
||||
import QtQuick 2.4 |
||||
import QtQuick.Controls 1.3 |
||||
import QtQuick.Dialogs 1.2 |
||||
|
||||
import QGroundControl 1.0 |
||||
import QGroundControl.ScreenTools 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
import QGroundControl.Palette 1.0 |
||||
|
||||
Rectangle { |
||||
visible: helpButton.checked |
||||
color: qgcPal.window |
||||
opacity: _rightPanelOpacity |
||||
radius: ScreenTools.defaultFontPixelHeight |
||||
z: QGroundControl.zOrderTopMost |
||||
|
||||
readonly property real margins: ScreenTools.defaultFontPixelHeight |
||||
|
||||
Image { |
||||
anchors.margins: ScreenTools.defaultFontPixelHeight |
||||
anchors.top: parent.top |
||||
anchors.right: parent.right |
||||
width: ScreenTools.defaultFontPixelHeight * 1.5 |
||||
height: ScreenTools.defaultFontPixelHeight * 1.5 |
||||
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/XDeleteBlack.svg" : "/qmlimages/XDelete.svg" |
||||
fillMode: Image.PreserveAspectFit |
||||
mipmap: true |
||||
smooth: true |
||||
|
||||
MouseArea { |
||||
anchors.fill: parent |
||||
onClicked: helpButton.checked = false |
||||
} |
||||
} |
||||
|
||||
Item { |
||||
anchors.margins: _margin |
||||
anchors.fill: parent |
||||
|
||||
QGCLabel { |
||||
id: helpTitle |
||||
font.pixelSize: ScreenTools.mediumFontPixelSize |
||||
text: "Mission Planner" |
||||
} |
||||
|
||||
QGCLabel { |
||||
id: helpIconLabel |
||||
anchors.topMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.top: helpTitle.bottom |
||||
width: parent.width |
||||
wrapMode: Text.WordWrap |
||||
text: "Mission Planner tool buttons:" |
||||
} |
||||
|
||||
Image { |
||||
id: addMissionItemsHelpIcon |
||||
anchors.topMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.top: helpIconLabel.bottom |
||||
width: ScreenTools.defaultFontPixelHeight * 3 |
||||
fillMode: Image.PreserveAspectFit |
||||
mipmap: true |
||||
smooth: true |
||||
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/MapAddMissionBlack.svg" : "/qmlimages/MapAddMission.svg" |
||||
} |
||||
|
||||
QGCLabel { |
||||
id: addMissionItemsHelpText |
||||
anchors.leftMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.left: mapTypeHelpIcon.right |
||||
anchors.right: parent.right |
||||
anchors.top: addMissionItemsHelpIcon.top |
||||
wrapMode: Text.WordWrap |
||||
text: "<b>Add Mission Items</b><br>" + |
||||
"When enabled, add mission items by clicking on the map." |
||||
} |
||||
|
||||
Image { |
||||
id: deleteHelpIcon |
||||
anchors.topMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.top: addMissionItemsHelpText.bottom |
||||
width: ScreenTools.defaultFontPixelHeight * 3 |
||||
fillMode: Image.PreserveAspectFit |
||||
mipmap: true |
||||
smooth: true |
||||
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/TrashDeleteBlack.svg" : "/qmlimages/TrashDelete.svg" |
||||
} |
||||
|
||||
QGCLabel { |
||||
id: deleteHelpText |
||||
anchors.leftMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.left: mapTypeHelpIcon.right |
||||
anchors.right: parent.right |
||||
anchors.top: deleteHelpIcon.top |
||||
wrapMode: Text.WordWrap |
||||
text: "<b>Delete Mission Item</b><br>" + |
||||
"Delete the currently selected mission item." |
||||
} |
||||
|
||||
/* |
||||
Home Position Manager disabled |
||||
|
||||
Image { |
||||
id: homePositionManagerHelpIcon |
||||
anchors.topMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.top: deleteHelpText.bottom |
||||
width: ScreenTools.defaultFontPixelHeight * 3 |
||||
fillMode: Image.PreserveAspectFit |
||||
mipmap: true |
||||
smooth: true |
||||
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/MapHomeBlack.svg" : "/qmlimages/MapHome.svg" |
||||
} |
||||
|
||||
QGCLabel { |
||||
id: homePositionManagerHelpText |
||||
anchors.leftMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.left: mapTypeHelpIcon.right |
||||
anchors.right: parent.right |
||||
anchors.top: homePositionManagerHelpIcon.top |
||||
wrapMode: Text.WordWrap |
||||
text: "<b>Flying Field Manager</b><br>" + |
||||
"When enabled, allows you to select/add/update flying field locations. " + |
||||
"You can save multiple flying field locations for use while creating missions while you are not connected to your vehicle." |
||||
} |
||||
*/ |
||||
|
||||
Image { |
||||
id: mapCenterHelpIcon |
||||
anchors.topMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.top: deleteHelpText.bottom |
||||
width: ScreenTools.defaultFontPixelHeight * 3 |
||||
fillMode: Image.PreserveAspectFit |
||||
mipmap: true |
||||
smooth: true |
||||
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/MapCenterBlack.svg" : "/qmlimages/MapCenter.svg" |
||||
} |
||||
|
||||
QGCLabel { |
||||
id: mapCenterHelpText |
||||
anchors.leftMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.left: mapTypeHelpIcon.right |
||||
anchors.right: parent.right |
||||
anchors.top: mapCenterHelpIcon.top |
||||
wrapMode: Text.WordWrap |
||||
text: "<b>Map Center</b><br>" + |
||||
"Options for centering the map." |
||||
} |
||||
|
||||
Image { |
||||
id: syncHelpIcon |
||||
anchors.topMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.top: mapCenterHelpText.bottom |
||||
width: ScreenTools.defaultFontPixelHeight * 3 |
||||
fillMode: Image.PreserveAspectFit |
||||
mipmap: true |
||||
smooth: true |
||||
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/MapSyncBlack.svg" : "/qmlimages/MapSync.svg" |
||||
} |
||||
|
||||
QGCLabel { |
||||
id: syncHelpText |
||||
anchors.leftMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.left: mapTypeHelpIcon.right |
||||
anchors.right: parent.right |
||||
anchors.top: syncHelpIcon.top |
||||
wrapMode: Text.WordWrap |
||||
text: "<b>Sync</b><br>" + |
||||
"Options for saving/loading mission items." |
||||
} |
||||
|
||||
Image { |
||||
id: mapTypeHelpIcon |
||||
anchors.topMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.top: syncHelpText.bottom |
||||
width: ScreenTools.defaultFontPixelHeight * 3 |
||||
fillMode: Image.PreserveAspectFit |
||||
mipmap: true |
||||
smooth: true |
||||
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/MapTypeBlack.svg" : "/qmlimages/MapType.svg" |
||||
} |
||||
|
||||
QGCLabel { |
||||
id: mapTypeHelpText |
||||
anchors.leftMargin: ScreenTools.defaultFontPixelHeight |
||||
anchors.left: mapTypeHelpIcon.right |
||||
anchors.right: parent.right |
||||
anchors.top: mapTypeHelpIcon.top |
||||
wrapMode: Text.WordWrap |
||||
text: "<b>Map Type</b><br>" + |
||||
"Map type options." |
||||
} |
||||
|
||||
QGCCheckBox { |
||||
anchors.left: parent.left |
||||
anchors.bottom: parent.bottom |
||||
anchors.margins: _margin |
||||
checked: !_showHelp |
||||
text: "Don't show me again" |
||||
|
||||
onClicked: QGroundControl.flightMapSettings.saveBoolMapSetting(editorMap.mapName, _showHelpKey, !checked) |
||||
} |
||||
} |
||||
} |