Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
7644653c
Commit
7644653c
authored
May 06, 2020
by
DoinLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
2c09c1d8
Changes
40
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
960 additions
and
939 deletions
+960
-939
custom.qrc
custom-example/custom.qrc
+3
-0
qgcresources.exclusion
custom-example/qgcresources.exclusion
+1
-0
qgroundcontrol.qrc
custom-example/qgroundcontrol.qrc
+16
-3
CustomFlyViewOverlay.qml
custom-example/res/CustomFlyViewOverlay.qml
+55
-79
CustomPlugin.cc
custom-example/src/CustomPlugin.cc
+21
-15
CustomPlugin.h
custom-example/src/CustomPlugin.h
+15
-5
qgroundcontrol.qrc
qgroundcontrol.qrc
+8
-2
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+0
-301
FlightDisplayViewVideo.qml
src/FlightDisplay/FlightDisplayViewVideo.qml
+0
-13
FlightDisplayViewWidgets.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
+10
-227
FlyView.qml
src/FlightDisplay/FlyView.qml
+165
-0
FlyViewCustomLayer.qml
src/FlightDisplay/FlyViewCustomLayer.qml
+56
-0
FlyViewInstrumentPanel.qml
src/FlightDisplay/FlyViewInstrumentPanel.qml
+48
-0
FlyViewMap.qml
src/FlightDisplay/FlyViewMap.qml
+76
-100
FlyViewVideo.qml
src/FlightDisplay/FlyViewVideo.qml
+70
-0
FlyViewWidgetLayer.qml
src/FlightDisplay/FlyViewWidgetLayer.qml
+157
-0
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+1
-1
MultiVehiclePanel.qml
src/FlightDisplay/MultiVehiclePanel.qml
+6
-4
VehicleWarnings.qml
src/FlightDisplay/VehicleWarnings.qml
+59
-0
VirtualJoystick.qml
src/FlightDisplay/VirtualJoystick.qml
+2
-4
FlightMap.qml
src/FlightMap/FlightMap.qml
+0
-9
MapFitFunctions.qml
src/FlightMap/Widgets/MapFitFunctions.qml
+1
-1
QGCInstrumentWidget.qml
src/FlightMap/Widgets/QGCInstrumentWidget.qml
+5
-9
QGCInstrumentWidgetAlternate.qml
src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
+5
-9
PlanToolBarIndicators.qml
src/PlanView/PlanToolBarIndicators.qml
+1
-1
PlanView.qml
src/PlanView/PlanView.qml
+1
-1
QGCMapPalette.cc
src/QGCMapPalette.cc
+0
-1
QGCMapPalette.h
src/QGCMapPalette.h
+0
-5
DropPanel.qml
src/QmlControls/DropPanel.qml
+1
-8
JoystickThumbPad.qml
src/QmlControls/JoystickThumbPad.qml
+41
-34
QGCControlDebug.qml
src/QmlControls/QGCControlDebug.qml
+2
-0
QGCPipOverlay.qml
src/QmlControls/QGCPipOverlay.qml
+9
-1
QGCToolInsets.qml
src/QmlControls/QGCToolInsets.qml
+40
-0
qmldir
src/QmlControls/QGroundControl/Controls/qmldir
+2
-0
qmldir
src/QmlControls/QGroundControl/FlightDisplay/qmldir
+7
-3
ToolStrip.qml
src/QmlControls/ToolStrip.qml
+2
-1
QGCCorePlugin.cc
src/api/QGCCorePlugin.cc
+8
-5
QGCOptions.cc
src/api/QGCOptions.cc
+18
-24
QGCOptions.h
src/api/QGCOptions.h
+36
-54
MainRootWindow.qml
src/ui/MainRootWindow.qml
+12
-19
No files found.
custom-example/custom.qrc
View file @
7644653c
...
...
@@ -31,4 +31,7 @@
<file alias="Custom/Widgets/CustomVehicleButton.qml">res/Custom/Widgets/CustomVehicleButton.qml</file>
<file alias="Custom/Widgets/qmldir">res/Custom/Widgets/qmldir</file>
</qresource>
<qresource prefix="/qml">
<file alias="QGroundControl/FlightDisplay/FlyViewCustomLayer.qml">res/CustomFlyViewOverlay.qml</file>
</qresource>
</RCC>
custom-example/qgcresources.exclusion
View file @
7644653c
<file alias="PaperPlane.svg">src/ui/toolbar/Images/PaperPlane.svg</file>
<file alias="QGroundControl/FlightDisplay/FlyViewCustomLayer.qml">src/FlightDisplay/FlyViewCustomLayer.qml</file>
custom-example/qgroundcontrol.qrc
View file @
7644653c
...
...
@@ -127,6 +127,7 @@
<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/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/QGCFileDialog.qml">../src/QmlControls/QGCFileDialog.qml</file>
<file alias="QGroundControl/Controls/QGCFlickable.qml">../src/QmlControls/QGCFlickable.qml</file>
...
...
@@ -147,7 +148,8 @@
<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/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/QGCSlider.qml">../src/QmlControls/QGCSlider.qml</file>
<file alias="QGroundControl/Controls/QGCSwitch.qml">../src/QmlControls/QGCSwitch.qml</file>
...
...
@@ -155,6 +157,7 @@
<file alias="QGroundControl/Controls/QGCTabButton.qml">../src/QmlControls/QGCTabButton.qml</file>
<file alias="QGroundControl/Controls/QGCTextField.qml">../src/QmlControls/QGCTextField.qml</file>
<file alias="QGroundControl/Controls/QGCToolBarButton.qml">../src/QmlControls/QGCToolBarButton.qml</file>
<file alias="QGroundControl/Controls/QGCToolInsets.qml">../src/QmlControls/QGCToolInsets.qml</file>
<file alias="QGroundControl/Controls/QGCViewDialog.qml">../src/QmlControls/QGCViewDialog.qml</file>
<file alias="QGroundControl/Controls/QGCViewMessage.qml">../src/QmlControls/QGCViewMessage.qml</file>
<file alias="QGroundControl/Controls/qmldir">../src/QmlControls/QGroundControl/Controls/qmldir</file>
...
...
@@ -190,21 +193,31 @@
<file alias="QGroundControl/FactControls/FactTextFieldSlider.qml">../src/FactSystem/FactControls/FactTextFieldSlider.qml</file>
<file alias="QGroundControl/FactControls/FactValueSlider.qml">../src/FactSystem/FactControls/FactValueSlider.qml</file>
<file alias="QGroundControl/FactControls/qmldir">../src/QmlControls/QGroundControl/FactControls/qmldir</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayView.qml">../src/FlightDisplay/FlightDisplayView.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewMap.qml">../src/FlightDisplay/FlightDisplayViewMap.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewVideo.qml">../src/FlightDisplay/FlightDisplayViewVideo.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewWidgets.qml">../src/FlightDisplay/FlightDisplayViewWidgets.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewAirspaceIndicator.qml">../src/FlightDisplay/FlyViewAirspaceIndicator.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyView.qml">../src/FlightDisplay/FlyView.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewCustomLayer.qml">../src/FlightDisplay/FlyViewCustomLayer.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewInstrumentPanel.qml">../src/FlightDisplay/FlyViewInstrumentPanel.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewMap.qml">../src/FlightDisplay/FlyViewMap.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewMissionCompleteDialog.qml">../src/FlightDisplay/FlyViewMissionCompleteDialog.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewPreFlightChecklistPopup.qml">../src/FlightDisplay/FlyViewPreFlightChecklistPopup.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewToolStrip.qml">../src/FlightDisplay/FlyViewToolStrip.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewVideo.qml">../src/FlightDisplay/FlyViewVideo.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewWidgetLayer.qml">../src/FlightDisplay/FlyViewWidgetLayer.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedActionConfirm.qml">../src/FlightDisplay/GuidedActionConfirm.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedActionList.qml">../src/FlightDisplay/GuidedActionList.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedActionsController.qml">../src/FlightDisplay/GuidedActionsController.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedAltitudeSlider.qml">../src/FlightDisplay/GuidedAltitudeSlider.qml</file>
<file alias="QGroundControl/FlightDisplay/MultiVehicleList.qml">../src/FlightDisplay/MultiVehicleList.qml</file>
<file alias="QGroundControl/FlightDisplay/MultiVehiclePanel.qml">../src/FlightDisplay/MultiVehiclePanel.qml</file>
<file alias="QGroundControl/FlightDisplay/PreFlightBatteryCheck.qml">../src/FlightDisplay/PreFlightBatteryCheck.qml</file>
<file alias="QGroundControl/FlightDisplay/PreFlightGPSCheck.qml">../src/FlightDisplay/PreFlightGPSCheck.qml</file>
<file alias="QGroundControl/FlightDisplay/PreFlightRCCheck.qml">../src/FlightDisplay/PreFlightRCCheck.qml</file>
<file alias="QGroundControl/FlightDisplay/PreFlightSensorsHealthCheck.qml">../src/FlightDisplay/PreFlightSensorsHealthCheck.qml</file>
<file alias="QGroundControl/FlightDisplay/PreFlightSoundCheck.qml">../src/FlightDisplay/PreFlightSoundCheck.qml</file>
<file alias="QGroundControl/FlightDisplay/TerrainProgress.qml">../src/FlightDisplay/TerrainProgress.qml</file>
<file alias="QGroundControl/FlightDisplay/VehicleWarnings.qml">../src/FlightDisplay/VehicleWarnings.qml</file>
<file alias="QGroundControl/FlightDisplay/qmldir">../src/QmlControls/QGroundControl/FlightDisplay/qmldir</file>
<file alias="QGroundControl/FlightMap/CameraTriggerIndicator.qml">../src/FlightMap/MapItems/CameraTriggerIndicator.qml</file>
<file alias="QGroundControl/FlightMap/CenterMapDropButton.qml">../src/FlightMap/Widgets/CenterMapDropButton.qml</file>
...
...
custom-example/res/CustomFlyViewOverlay.qml
View file @
7644653c
This diff is collapsed.
Click to expand it.
custom-example/src/CustomPlugin.cc
View file @
7644653c
...
...
@@ -26,33 +26,41 @@
QGC_LOGGING_CATEGORY
(
CustomLog
,
"CustomLog"
)
Custom
Options
::
CustomOptions
(
CustomPlugin
*
,
QObject
*
parent
)
:
QGC
Options
(
parent
)
Custom
FlyViewOptions
::
CustomFlyViewOptions
(
CustomOptions
*
options
,
QObject
*
parent
)
:
QGC
FlyViewOptions
(
options
,
parent
)
{
}
//
Firmware upgrade page is only shown in Advanced Mode
.
bool
Custom
Options
::
showFirmwareUpgrade
(
)
const
//
This custom build does not support conecting multiple vehicles to it. This in turn simplifies various parts of the QGC ui
.
bool
Custom
FlyViewOptions
::
showMultiVehicleList
(
void
)
const
{
return
qgcApp
()
->
toolbox
()
->
corePlugin
()
->
showAdvancedUI
()
;
return
false
;
}
// This custom build
does not support conecting multiple vehicles to it. This in turn simplifies various parts of the QGC ui
.
bool
Custom
Options
::
enableMultiVehicleList
(
void
)
const
// This custom build
has it's own custom instrument panel. Don't show regular one
.
bool
Custom
FlyViewOptions
::
showInstrumentPanel
(
void
)
const
{
return
false
;
}
// This allows you to show a custom overlay on the fly screen.
QUrl
CustomOptions
::
flyViewOverlay
(
void
)
const
CustomOptions
::
CustomOptions
(
CustomPlugin
*
,
QObject
*
parent
)
:
QGCOptions
(
parent
)
{
}
QGCFlyViewOptions
*
CustomOptions
::
flyViewOptions
(
void
)
{
return
QUrl
::
fromUserInput
(
"qrc:/custom/CustomFlyViewOverlay.qml"
);
if
(
!
_flyViewOptions
)
{
_flyViewOptions
=
new
CustomFlyViewOptions
(
this
,
this
);
}
return
_flyViewOptions
;
}
//
The standard instrement widget is now show. Only the custom overlay is shown
.
CustomInstrumentWidget
*
CustomOptions
::
instrumentWidget
(
void
)
//
Firmware upgrade page is only shown in Advanced Mode
.
bool
CustomOptions
::
showFirmwareUpgrade
()
const
{
return
nullptr
;
return
qgcApp
()
->
toolbox
()
->
corePlugin
()
->
showAdvancedUI
()
;
}
// Normal QGC needs to work with an ESP8266 WiFi thing which is remarkably crappy. This in turns causes PX4 Pro calibration to fail
...
...
@@ -63,11 +71,9 @@ bool CustomOptions::wifiReliableForCalibration(void) const
return
true
;
}
CustomPlugin
::
CustomPlugin
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCCorePlugin
(
app
,
toolbox
)
{
_options
=
new
CustomOptions
(
this
,
this
);
_showAdvancedUI
=
false
;
}
...
...
custom-example/src/CustomPlugin.h
View file @
7644653c
...
...
@@ -19,25 +19,35 @@
#include <QTranslator>
class
CustomOptions
;
class
CustomPlugin
;
class
CustomSettings
;
Q_DECLARE_LOGGING_CATEGORY
(
CustomLog
)
class
CustomFlyViewOptions
:
public
QGCFlyViewOptions
{
public:
CustomFlyViewOptions
(
CustomOptions
*
options
,
QObject
*
parent
=
nullptr
);
// Overrides from CustomFlyViewOptions
bool
showInstrumentPanel
(
void
)
const
final
;
bool
showMultiVehicleList
(
void
)
const
final
;
};
class
CustomOptions
:
public
QGCOptions
{
public:
CustomOptions
(
CustomPlugin
*
,
QObject
*
parent
=
nullptr
);
// Overrides from QGCOptions
bool
wifiReliableForCalibration
(
void
)
const
final
;
QUrl
flyViewOverlay
(
void
)
const
final
;
CustomInstrumentWidget
*
instrumentWidget
(
void
)
final
;
bool
showFirmwareUpgrade
(
void
)
const
final
;
bool
enableMultiVehicleList
(
void
)
const
final
;
};
QGCFlyViewOptions
*
flyViewOptions
(
void
)
final
;
private:
CustomFlyViewOptions
*
_flyViewOptions
=
nullptr
;
};
class
CustomPlugin
:
public
QGCCorePlugin
{
...
...
qgroundcontrol.qrc
View file @
7644653c
...
...
@@ -157,6 +157,7 @@
<file alias="QGroundControl/Controls/QGCTabButton.qml">src/QmlControls/QGCTabButton.qml</file>
<file alias="QGroundControl/Controls/QGCTextField.qml">src/QmlControls/QGCTextField.qml</file>
<file alias="QGroundControl/Controls/QGCToolBarButton.qml">src/QmlControls/QGCToolBarButton.qml</file>
<file alias="QGroundControl/Controls/QGCToolInsets.qml">src/QmlControls/QGCToolInsets.qml</file>
<file alias="QGroundControl/Controls/QGCViewDialog.qml">src/QmlControls/QGCViewDialog.qml</file>
<file alias="QGroundControl/Controls/QGCViewMessage.qml">src/QmlControls/QGCViewMessage.qml</file>
<file alias="QGroundControl/Controls/qmldir">src/QmlControls/QGroundControl/Controls/qmldir</file>
...
...
@@ -192,14 +193,18 @@
<file alias="QGroundControl/FactControls/FactTextFieldSlider.qml">src/FactSystem/FactControls/FactTextFieldSlider.qml</file>
<file alias="QGroundControl/FactControls/FactValueSlider.qml">src/FactSystem/FactControls/FactValueSlider.qml</file>
<file alias="QGroundControl/FactControls/qmldir">src/QmlControls/QGroundControl/FactControls/qmldir</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayView.qml">src/FlightDisplay/FlightDisplayView.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewMap.qml">src/FlightDisplay/FlightDisplayViewMap.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewVideo.qml">src/FlightDisplay/FlightDisplayViewVideo.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewWidgets.qml">src/FlightDisplay/FlightDisplayViewWidgets.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewAirspaceIndicator.qml">src/FlightDisplay/FlyViewAirspaceIndicator.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyView.qml">src/FlightDisplay/FlyView.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewCustomLayer.qml">src/FlightDisplay/FlyViewCustomLayer.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewInstrumentPanel.qml">src/FlightDisplay/FlyViewInstrumentPanel.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewMap.qml">src/FlightDisplay/FlyViewMap.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewMissionCompleteDialog.qml">src/FlightDisplay/FlyViewMissionCompleteDialog.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewPreFlightChecklistPopup.qml">src/FlightDisplay/FlyViewPreFlightChecklistPopup.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewToolStrip.qml">src/FlightDisplay/FlyViewToolStrip.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewVideo.qml">src/FlightDisplay/FlyViewVideo.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewWidgetLayer.qml">src/FlightDisplay/FlyViewWidgetLayer.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedActionConfirm.qml">src/FlightDisplay/GuidedActionConfirm.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedActionList.qml">src/FlightDisplay/GuidedActionList.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedActionsController.qml">src/FlightDisplay/GuidedActionsController.qml</file>
...
...
@@ -212,6 +217,7 @@
<file alias="QGroundControl/FlightDisplay/PreFlightSensorsHealthCheck.qml">src/FlightDisplay/PreFlightSensorsHealthCheck.qml</file>
<file alias="QGroundControl/FlightDisplay/PreFlightSoundCheck.qml">src/FlightDisplay/PreFlightSoundCheck.qml</file>
<file alias="QGroundControl/FlightDisplay/TerrainProgress.qml">src/FlightDisplay/TerrainProgress.qml</file>
<file alias="QGroundControl/FlightDisplay/VehicleWarnings.qml">src/FlightDisplay/VehicleWarnings.qml</file>
<file alias="QGroundControl/FlightDisplay/qmldir">src/QmlControls/QGroundControl/FlightDisplay/qmldir</file>
<file alias="QGroundControl/FlightMap/CameraTriggerIndicator.qml">src/FlightMap/MapItems/CameraTriggerIndicator.qml</file>
<file alias="QGroundControl/FlightMap/CenterMapDropButton.qml">src/FlightMap/Widgets/CenterMapDropButton.qml</file>
...
...
src/FlightDisplay/FlightDisplayView.qml
deleted
100644 → 0
View file @
2c09c1d8
This diff is collapsed.
Click to expand it.
src/FlightDisplay/FlightDisplayViewVideo.qml
View file @
7644653c
...
...
@@ -50,12 +50,6 @@ Item {
font.pointSize
:
useSmallFont
?
ScreenTools
.
smallFontPointSize
:
ScreenTools
.
largeFontPointSize
anchors.centerIn
:
parent
}
MouseArea
{
anchors.fill
:
parent
onDoubleClicked
:
{
QGroundControl
.
videoManager
.
fullScreen
=
!
QGroundControl
.
videoManager
.
fullScreen
}
}
}
Rectangle
{
anchors.fill
:
parent
...
...
@@ -176,13 +170,6 @@ Item {
opacity
:
_camera
?
(
_camera
.
thermalMode
===
QGCCameraControl
.
THERMAL_BLEND
?
_camera
.
thermalOpacity
/
100
:
1.0
)
:
0
}
}
//-- Full screen toggle
MouseArea
{
anchors.fill
:
parent
onDoubleClicked
:
{
QGroundControl
.
videoManager
.
fullScreen
=
!
QGroundControl
.
videoManager
.
fullScreen
}
}
//-- Zoom
PinchArea
{
id
:
pinchZoom
...
...
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
7644653c
This diff is collapsed.
Click to expand it.
src/FlightDisplay/FlyView.qml
0 → 100644
View file @
7644653c
/****************************************************************************
*
* (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
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Dialogs
1.3
import
QtQuick
.
Layouts
1.12
import
QtLocation
5.3
import
QtPositioning
5.3
import
QtQuick
.
Window
2.2
import
QtQml
.
Models
2.1
import
QGroundControl
1.0
import
QGroundControl
.
Airspace
1.0
import
QGroundControl
.
Airmap
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FlightDisplay
1.0
import
QGroundControl
.
FlightMap
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Vehicle
1.0
Item
{
id
:
_root
PlanMasterController
{
id
:
_planController
Component.onCompleted
:
{
start
(
true
/* flyView */
)
mainWindow
.
planMasterControllerFlyView
=
_planController
}
}
property
bool
_mainWindowIsMap
:
mapControl
.
pipState
.
state
===
mapControl
.
pipState
.
fullState
property
bool
_isFullWindowItemDark
:
_mainWindowIsMap
?
mapControl
.
isSatelliteMap
:
true
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_missionController
:
_planController
.
missionController
property
var
_geoFenceController
:
_planController
.
geoFenceController
property
var
_rallyPointController
:
_planController
.
rallyPointController
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
var
_guidedController
:
guidedActionsController
property
var
_guidedActionList
:
guidedActionList
property
var
_guidedAltSlider
:
guidedAltSlider
property
var
_guidedConfirm
:
guidedActionConfirm
property
real
_toolsMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.75
property
rect
_centerViewport
:
Qt
.
rect
(
0
,
0
,
width
,
height
)
property
real
_rightPanelWidth
:
ScreenTools
.
defaultFontPixelWidth
*
30
property
var
_mapControl
:
mapControl
property
real
_fullItemZorder
:
0
property
real
_pipItemZorder
:
QGroundControl
.
zOrderWidgets
function
_calcCenterViewPort
()
{
var
newToolInset
=
Qt
.
rect
(
0
,
0
,
width
,
height
)
toolstrip
.
adjustToolInset
(
newToolInset
)
if
(
QGroundControl
.
corePlugin
.
options
.
instrumentWidget
)
{
flightDisplayViewWidgets
.
adjustToolInset
(
newToolInset
)
}
}
QGCToolInsets
{
id
:
_toolInsets
leftEdgeBottomInset
:
_pipOverlay
.
visible
?
_pipOverlay
.
x
+
_pipOverlay
.
width
:
0
bottomEdgeLeftInset
:
_pipOverlay
.
visible
?
parent
.
height
-
_pipOverlay
.
y
:
0
}
FlyViewWidgetLayer
{
id
:
widgetLayer
anchors.rightMargin
:
_toolsMargin
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
guidedAltSlider
.
visible
?
guidedAltSlider
.
left
:
parent
.
right
z
:
_fullItemZorder
+
1
parentToolInsets
:
_toolInsets
mapControl
:
_mapControl
visible
:
!
QGroundControl
.
videoManager
.
fullScreen
}
FlyViewCustomLayer
{
id
:
customOverlay
anchors.fill
:
widgetLayer
z
:
_fullItemZorder
+
2
parentToolInsets
:
widgetLayer
.
totalToolInsets
mapControl
:
_mapControl
visible
:
!
QGroundControl
.
videoManager
.
fullScreen
}
GuidedActionsController
{
id
:
guidedActionsController
missionController
:
_missionController
confirmDialog
:
_guidedConfirm
actionList
:
_guidedActionList
altitudeSlider
:
_guidedAltSlider
}
GuidedActionConfirm
{
id
:
guidedActionConfirm
anchors.margins
:
_margins
anchors.bottom
:
parent
.
bottom
anchors.horizontalCenter
:
parent
.
horizontalCenter
z
:
QGroundControl
.
zOrderTopMost
guidedController
:
_guidedController
altitudeSlider
:
_guidedAltSlider
}
GuidedActionList
{
id
:
guidedActionList
anchors.margins
:
_margins
anchors.bottom
:
parent
.
bottom
anchors.horizontalCenter
:
parent
.
horizontalCenter
z
:
QGroundControl
.
zOrderTopMost
guidedController
:
_guidedController
}
//-- Altitude slider
GuidedAltitudeSlider
{
id
:
guidedAltSlider
anchors.margins
:
_toolsMargin
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
z
:
QGroundControl
.
zOrderTopMost
radius
:
ScreenTools
.
defaultFontPixelWidth
/
2
width
:
ScreenTools
.
defaultFontPixelWidth
*
10
color
:
qgcPal
.
window
visible
:
false
}
FlyViewMap
{
id
:
mapControl
guidedActionsController
:
_guidedController
planMasterController
:
_planController
rightPanelWidth
:
ScreenTools
.
defaultFontPixelHeight
*
9
pipMode
:
!
_mainWindowIsMap
toolInsets
:
customOverlay
.
totalToolInsets
mapName
:
"
FlightDisplayView
"
}
FlyViewVideo
{
id
:
videoControl
}
QGCPipOverlay
{
id
:
_pipOverlay
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
anchors.margins
:
_toolsMargin
item1IsFullSettingsKey
:
"
MainFlyWindowIsMap
"
item1
:
mapControl
item2
:
QGroundControl
.
videoManager
.
hasVideo
?
videoControl
:
null
fullZOrder
:
_fullItemZorder
pipZOrder
:
_pipItemZorder
show
:
!
QGroundControl
.
videoManager
.
fullScreen
}
}
src/FlightDisplay/FlyViewCustomLayer.qml
0 → 100644
View file @
7644653c
/****************************************************************************
*
* (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
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Dialogs
1.3
import
QtQuick
.
Layouts
1.12
import
QtLocation
5.3
import
QtPositioning
5.3
import
QtQuick
.
Window
2.2
import
QtQml
.
Models
2.1
import
QGroundControl
1.0
import
QGroundControl
.
Airspace
1.0
import
QGroundControl
.
Airmap
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FlightDisplay
1.0
import
QGroundControl
.
FlightMap
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Vehicle
1.0
// To implement a custom overlay copy this code to your own control in your custom code source. Then override the
// FlyViewCustomLayer.qml resource with your own qml. See the custom example and documentation for details.
Item
{
id
:
_root
property
var
parentToolInsets
// These insets tell you what screen real estate is available for positioning the controls in your overlay
property
var
toolInsets
:
_toolInsets
// These are the insets for your custom overlay additions
property
var
mapControl
QGCToolInsets
{
id
:
_toolInsets
leftEdgeCenterInset
:
0
leftEdgeTopInset
:
0
leftEdgeBottomInset
:
0
rightEdgeCenterInset
:
0
rightEdgeTopInset
:
0
rightEdgeBottomInset
:
0
topEdgeCenterInset
:
0
topEdgeLeftInset
:
0
topEdgeRightInset
:
0
bottomEdgeCenterInset
:
0
bottomEdgeLeftInset
:
0
bottomEdgeRightInset
:
0
}
}
src/FlightDisplay/FlyViewInstrumentPanel.qml
0 → 100644
View file @
7644653c
/****************************************************************************
*
* (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
import
QGroundControl
1.0
import
QGroundControl
.
Airspace
1.0
import
QGroundControl
.
Airmap
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
// This control contains the instruments as well and the instrument pages which include values, camera, ...
Column
{
id
:
_root
spacing
:
_toolsMargin
z
:
QGroundControl
.
zOrderWidgets
property
real
availableHeight
property
var
guidedActionsController
MultiVehiclePanel
{
id
:
multiVehiclePanel
width
:
parent
.
width
availableHeight
:
parent
.
height
-
y
guidedActionsController
:
_root
.
guidedActionsController
}
AirspaceControl
{
id
:
airspaceControl
width
:
parent
.
width
planView
:
false
visible
:
QGroundControl
.
airmapSupported
?
QGroundControl
.
settingsManager
.
airMapSettings
.
enableAirMap
.
rawValue
:
false
}
FlightDisplayViewWidgets
{
id
:
flightDisplayViewWidgets
width
:
parent
.
width
missionController
:
_missionController
availableHeight
:
_root
.
availableHeight
-
y
visible
:
multiVehiclePanel
.
singleVehiclePanel
}
}
src/FlightDisplay/Fl
ightDispla
yViewMap.qml
→
src/FlightDisplay/FlyViewMap.qml
View file @
7644653c
This diff is collapsed.
Click to expand it.
src/FlightDisplay/FlyViewVideo.qml
0 → 100644
View file @
7644653c
/****************************************************************************
*
* (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
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
Item
{
id
:
_root
visible
:
QGroundControl
.
videoManager
.
hasVideo
property
Item
pipState
:
videoPipState
QGCPipState
{
id
:
videoPipState
pipOverlay
:
_pipOverlay
isDark
:
true
onWindowAboutToOpen
:
{
QGroundControl
.
videoManager
.
stopVideo
()
videoStartDelay
.
start
()
}
onWindowAboutToClose
:
{
QGroundControl
.
videoManager
.
stopVideo
()
videoStartDelay
.
start
()
}
onStateChanged
:
{
if
(
pipState
.
state
!==
pipState
.
fullState
)
{
QGroundControl
.
videoManager
.
fullScreen
=
false
}
}
}
Timer
{
id
:
videoStartDelay
interval
:
2000
;
running
:
false
repeat
:
false
onTriggered
:
QGroundControl
.
videoManager
.
startVideo
()
}
//-- Video Streaming
FlightDisplayViewVideo
{
id
:
videoStreaming
anchors.fill
:
parent
useSmallFont
:
_root
.
pipState
.
state
!==
_root
.
pipState
.
fullState
visible
:
QGroundControl
.
videoManager
.
isGStreamer
}
//-- UVC Video (USB Camera or Video Device)
Loader
{
id
:
cameraLoader
anchors.fill
:
parent
visible
:
!
QGroundControl
.
videoManager
.
isGStreamer
source
:
visible
?
(
QGroundControl
.
videoManager
.
uvcEnabled
?
"
qrc:/qml/FlightDisplayViewUVC.qml
"
:
"
qrc:/qml/FlightDisplayViewDummy.qml
"
)
:
""
}
MouseArea
{
anchors.fill
:
parent
enabled
:
pipState
.
state
===
pipState
.
fullState
onDoubleClicked
:
QGroundControl
.
videoManager
.
fullScreen
=
!
QGroundControl
.
videoManager
.
fullScreen
}
}
src/FlightDisplay/FlyViewWidgetLayer.qml
0 → 100644
View file @
7644653c
/****************************************************************************
*
* (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
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Dialogs
1.3
import
QtQuick
.
Layouts
1.12
import
QtLocation
5.3
import
QtPositioning
5.3
import
QtQuick
.
Window
2.2
import
QtQml
.
Models
2.1
import
QGroundControl
1.0
import
QGroundControl
.
Airspace
1.0
import
QGroundControl
.
Airmap
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FlightDisplay
1.0
import
QGroundControl
.
FlightMap
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Vehicle
1.0
// This is the ui overlay layer for the widgets/tools for Fly View
Item
{
id
:
_root
property
var
parentToolInsets
property
var
totalToolInsets
:
_totalToolInsets
property
var
mapControl
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_planMasterController
:
mainWindow
.
planMasterControllerPlanView
property
var
_missionController
:
_planMasterController
.
missionController
property
var
_geoFenceController
:
_planMasterController
.
geoFenceController
property
var
_rallyPointController
:
_planMasterController
.
rallyPointController
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_toolsMargin
:
ScreenTools
.
defaultFontPixelWidth
*
0.75
property
rect
_centerViewport
:
Qt
.
rect
(
0
,
0
,
width
,
height
)
property
real
_rightPanelWidth
:
ScreenTools
.
defaultFontPixelWidth
*
30
QGCToolInsets
{
id
:
_totalToolInsets
leftEdgeCenterInset
:
toolStrip
.
leftInset
leftEdgeTopInset
:
toolStrip
.
leftInset
leftEdgeBottomInset
:
parentToolInsets
.
leftEdgeBottomInset
rightEdgeCenterInset
:
instrumentPanel
.
rightInset
rightEdgeTopInset
:
instrumentPanel
.
rightInset
rightEdgeBottomInset
:
instrumentPanel
.
rightInset
topEdgeCenterInset
:
parentToolInsets
.
topEdgeCenterInset
topEdgeLeftInset
:
parentToolInsets
.
topEdgeLeftInset
topEdgeRightInset
:
parentToolInsets
.
topEdgeRightInset
bottomEdgeCenterInset
:
mapScale
.
centerInset
bottomEdgeLeftInset
:
parentToolInsets
.
bottomEdgeLeftInset
bottomEdgeRightInset
:
parentToolInsets
.
bottomEdgeRightInset
}
FlyViewMissionCompleteDialog
{
missionController
:
_missionController
geoFenceController
:
_geoFenceController
rallyPointController
:
_rallyPointController
guidedController
:
_root
.
guidedActionsController
}
FlyViewInstrumentPanel
{
id
:
instrumentPanel
anchors.margins
:
_toolsMargin
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
width
:
_rightPanelWidth
spacing
:
_toolsMargin
visible
:
QGroundControl
.
corePlugin
.
options
.
flyView
.
showInstrumentPanel
guidedActionsController
:
_guidedController
availableHeight
:
parent
.
height
-
y
-
_toolsMargin
property
real
rightInset
:
visible
?
parent
.
width
-
x
:
0
}
//-- Virtual Joystick
Loader
{
id
:
virtualJoystickMultiTouch
z
:
QGroundControl
.
zOrderTopMost
+
1
width
:
parent
.
width
-
(
_pipOverlay
.
width
/
2
)
height
:
Math
.
min
(
parent
.
height
*
0.25
,
ScreenTools
.
defaultFontPixelWidth
*
16
)
visible
:
(
_virtualJoystick
?
_virtualJoystick
.
value
:
false
)
&&
!
(
_activeVehicle
?
_activeVehicle
.
highLatencyLink
:
false
)
anchors.bottom
:
parent
.
bottom
anchors.bottomMargin
:
parentToolInsets
.
leftEdgeBottomInset
+
ScreenTools
.
defaultFontPixelHeight
*
2
anchors.horizontalCenter
:
parent
.
horizontalCenter
source
:
"
qrc:/qml/VirtualJoystick.qml
"
active
:
(
_virtualJoystick
?
_virtualJoystick
.
value
:
false
)
&&
!
(
_activeVehicle
?
_activeVehicle
.
highLatencyLink
:
false
)
property
bool
centralizeThrottle
:
_virtualJoystickCentralized
?
_virtualJoystickCentralized
.
value
:
false
property
var
parentToolInsets
:
_totalToolInsets
property
Fact
_virtualJoystick
:
QGroundControl
.
settingsManager
.
appSettings
.
virtualJoystick
property
Fact
_virtualJoystickCentralized
:
QGroundControl
.
settingsManager
.
appSettings
.
virtualJoystickCentralized
}
FlyViewToolStrip
{
id
:
toolStrip
anchors.leftMargin
:
_toolsMargin
+
parentToolInsets
.
leftEdgeCenterInset
anchors.topMargin
:
_toolsMargin
+
parentToolInsets
.
leftEdgeTopInset
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
z
:
QGroundControl
.
zOrderWidgets
maxHeight
:
parent
.
height
-
y
-
parentToolInsets
.
leftEdgeBottomInset
-
_toolsMargin
guidedActionsController
:
_guidedController
guidedActionList
:
_guidedActionList
usePreFlightChecklist
:
preFlightChecklistPopup
.
useChecklist
visible
:
!
QGroundControl
.
videoManager
.
fullScreen
onDisplayPreFlightChecklist
:
preFlightChecklistPopup
.
open
()
property
real
leftInset
:
x
+
width
}
FlyViewAirspaceIndicator
{
anchors.top
:
parent
.
top
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
anchors.horizontalCenter
:
parent
.
horizontalCenter
z
:
QGroundControl
.
zOrderWidgets
show
:
mapControl
.
pipState
.
state
!==
mapControl
.
pipState
.
pipState
}
VehicleWarnings
{
anchors.centerIn
:
parent
z
:
QGroundControl
.
zOrderTopMost
}
MapScale
{
id
:
mapScale
anchors.leftMargin
:
parentToolInsets
.
leftEdgeBottomInset
+
_toolsMargin
anchors.bottomMargin
:
parentToolInsets
.
bottomEdgeCenterInset
+
_toolsMargin
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
mapControl
:
_mapControl
buttonsOnLeft
:
true
visible
:
!
ScreenTools
.
isTinyScreen
&&
QGroundControl
.
corePlugin
.
options
.
flyView
.
showMapScale
&&
mapControl
.
pipState
.
state
!==
mapControl
.
pipState
.
pipState
property
real
centerInset
:
visible
?
parent
.
height
-
y
:
0
}
FlyViewPreFlightChecklistPopup
{
id
:
preFlightChecklistPopup
x
:
toolStrip
.
x
+
toolStrip
.
width
+
(
ScreenTools
.
defaultFontPixelWidth
*
2
)
y
:
toolStrip
.
y
}
}
src/FlightDisplay/GuidedActionsController.qml
View file @
7644653c
...
...
@@ -118,7 +118,7 @@ Item {
// Note: The '_missionItemCount - 2' is a hack to not trigger resume mission when a mission ends with an RTL item
property
bool
showResumeMission
:
activeVehicle
&&
!
_vehicleArmed
&&
_vehicleWasFlying
&&
_missionAvailable
&&
_resumeMissionIndex
>
0
&&
(
_resumeMissionIndex
<
_missionItemCount
-
2
)
property
bool
guidedUIVisible
:
guidedActionConfirm
.
visible
||
guidedA
ctionList
.
visible
property
bool
guidedUIVisible
:
confirmDialog
.
visible
||
a
ctionList
.
visible
property
var
_corePlugin
:
QGroundControl
.
corePlugin
property
bool
_guidedActionsEnabled
:
(
!
ScreenTools
.
isDebug
&&
QGroundControl
.
corePlugin
.
options
.
guidedActionsRequireRCRSSI
&&
activeVehicle
)
?
_rcRSSIAvailable
:
activeVehicle
...
...
src/FlightDisplay/MultiVehiclePanel.qml
View file @
7644653c
...
...
@@ -15,18 +15,20 @@ import QGroundControl 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FlightDisplay
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Palette
1.0
/// Multi vehicle panel for Fly View
Item
{
id
:
_root
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
height
:
singleVehiclePanel
?
selectorRow
.
height
:
availableHeight
visible
:
QGroundControl
.
multiVehicleManager
.
vehicles
.
count
>
1
&&
QGroundControl
.
corePlugin
.
options
.
enable
MultiVehicleList
visible
:
QGroundControl
.
multiVehicleManager
.
vehicles
.
count
>
1
&&
QGroundControl
.
corePlugin
.
options
.
flyView
.
show
MultiVehicleList
property
alias
singleVehiclePanel
:
singleVehicleView
.
checked
property
alias
singleVehiclePanel
:
singleVehicleView
.
checked
property
real
availableHeight
property
var
guidedActionsController
QGCMapPalette
{
id
:
mapPal
;
lightColors
:
true
}
Row
{
id
:
selectorRow
spacing
:
ScreenTools
.
defaultFontPixelWidth
...
...
@@ -49,7 +51,7 @@ Item {
anchors.top
:
selectorRow
.
bottom
anchors.bottom
:
parent
.
bottom
width
:
parent
.
width
visible
:
!
singleVehiclePanel
&&
!
QGroundControl
.
videoManager
.
fullScreen
&&
QGroundControl
.
corePlugin
.
options
.
enable
MultiVehicleList
visible
:
!
singleVehiclePanel
&&
!
QGroundControl
.
videoManager
.
fullScreen
&&
QGroundControl
.
corePlugin
.
options
.
show
MultiVehicleList
guidedActionsController
:
_root
.
guidedActionsController
}
}
src/FlightDisplay/VehicleWarnings.qml
0 → 100644
View file @
7644653c
/****************************************************************************
*
* (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.3
import
QGroundControl
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controls
1.0
Rectangle
{
anchors.margins
:
-
ScreenTools
.
defaultFontPixelHeight
height
:
warningsCol
.
height
width
:
warningsCol
.
width
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
radius
:
ScreenTools
.
defaultFontPixelWidth
/
2
visible
:
_noGPSLockVisible
||
_prearmErrorVisible
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
_noGPSLockVisible
:
_activeVehicle
&&
!
_activeVehicle
.
coordinate
.
isValid
property
bool
_prearmErrorVisible
:
_activeVehicle
&&
!
_activeVehicle
.
armed
&&
_activeVehicle
.
prearmError
Column
{
id
:
warningsCol
spacing
:
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
visible
:
_noGPSLockVisible
color
:
"
black
"
font.pointSize
:
ScreenTools
.
largeFontPointSize
text
:
qsTr
(
"
No GPS Lock for Vehicle
"
)
}
QGCLabel
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
visible
:
_prearmErrorVisible
color
:
"
black
"
font.pointSize
:
ScreenTools
.
largeFontPointSize
text
:
_activeVehicle
?
_activeVehicle
.
prearmError
:
""
}
QGCLabel
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
visible
:
_prearmErrorVisible
width
:
ScreenTools
.
defaultFontPixelWidth
*
50
horizontalAlignment
:
Text
.
AlignHCenter
wrapMode
:
Text
.
WordWrap
color
:
"
black
"
font.pointSize
:
ScreenTools
.
largeFontPointSize
text
:
qsTr
(
"
The vehicle has failed a pre-arm check. In order to arm the vehicle, resolve the failure.
"
)
}
}
}
src/FlightDisplay/VirtualJoystick.qml
View file @
7644653c
...
...
@@ -17,8 +17,8 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
Vehicle
1.0
Item
{
//property bool
useLightColors - Must be passed in from loaded
//property bool centralizeThrottle - Must be passed in from loaded
//property bool
centralizeThrottle - Must be passed in from loader
Timer
{
interval
:
40
// 25Hz, same as real joystick rate
running
:
QGroundControl
.
settingsManager
.
appSettings
.
virtualJoystick
.
value
&&
activeVehicle
...
...
@@ -40,7 +40,6 @@ Item {
height
:
parent
.
height
yAxisThrottle
:
true
yAxisThrottleCentered
:
centralizeThrottle
lightColors
:
useLightColors
}
JoystickThumbPad
{
...
...
@@ -51,6 +50,5 @@ Item {
anchors.bottom
:
parent
.
bottom
width
:
parent
.
height
height
:
parent
.
height
lightColors
:
useLightColors
}
}
src/FlightMap/FlightMap.qml
View file @
7644653c
...
...
@@ -37,7 +37,6 @@ Map {
property
bool
isSatelliteMap
:
activeMapType
.
name
.
indexOf
(
"
Satellite
"
)
>
-
1
||
activeMapType
.
name
.
indexOf
(
"
Hybrid
"
)
>
-
1
property
var
gcsPosition
:
QGroundControl
.
qgcPositionManger
.
gcsPosition
property
real
gcsHeading
:
QGroundControl
.
qgcPositionManger
.
gcsHeading
property
bool
userPanned
:
false
///< true: the user has manually panned the map
property
bool
allowGCSLocationCenter
:
false
///< true: map will center/zoom to gcs location one time
property
bool
allowVehicleLocationCenter
:
false
///< true: map will center/zoom to vehicle location one time
property
bool
firstGCSPositionReceived
:
false
///< true: first gcs position update was responded to
...
...
@@ -88,14 +87,6 @@ Map {
}
}
// We track whether the user has panned or not to correctly handle automatic map positioning
Connections
{
target
:
gesture
onPanFinished
:
userPanned
=
true
onFlickFinished
:
userPanned
=
true
}
function
updateActiveMapType
()
{
var
settings
=
QGroundControl
.
settingsManager
.
flightMapSettings
var
fullMapName
=
settings
.
mapProvider
.
value
+
"
"
+
settings
.
mapType
.
value
...
...
src/FlightMap/Widgets/MapFitFunctions.qml
View file @
7644653c
...
...
@@ -13,7 +13,7 @@ import QtPositioning 5.3
import
QGroundControl
1.0
import
QGroundControl
.
FlightMap
1.0
/// Set of functions for fitting the map view
poer
to a specific constraint
/// Set of functions for fitting the map view to a specific constraint
Item
{
property
var
map
property
bool
usePlannedHomePosition
///< true: planned home position used for calculations, false: vehicle home position use for calculations
...
...
src/FlightMap/Widgets/QGCInstrumentWidget.qml
View file @
7644653c
...
...
@@ -20,16 +20,14 @@ import QGroundControl.Palette 1.0
ColumnLayout
{
id
:
root
width
:
getPreferredInstrumentWidth
()
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
4
// These properties are expected to be in the Loader
// property real maxHeight
// property bool showValues - true: show value pages
property
real
_innerRadius
:
(
width
-
(
_topBottomMargin
*
3
))
/
4
property
real
_outerRadius
:
_innerRadius
+
_topBottomMargin
property
real
_defaultSize
:
ScreenTools
.
defaultFontPixelHeight
*
(
9
)
property
real
_sizeRatio
:
ScreenTools
.
isTinyScreen
?
(
width
/
_defaultSize
)
*
0.5
:
width
/
_defaultSize
property
real
_bigFontSize
:
ScreenTools
.
defaultFontPointSize
*
2.5
*
_sizeRatio
property
real
_normalFontSize
:
ScreenTools
.
defaultFontPointSize
*
1.5
*
_sizeRatio
property
real
_labelFontSize
:
ScreenTools
.
defaultFontPointSize
*
0.75
*
_sizeRatio
property
real
_spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.33
property
real
_topBottomMargin
:
(
width
*
0.05
)
/
2
property
real
_availableValueHeight
:
maxHeight
-
_valuesItem
.
y
...
...
@@ -42,8 +40,6 @@ ColumnLayout {
Layout.fillWidth
:
true
radius
:
_outerRadius
color
:
qgcPal
.
window
border.width
:
1
border.color
:
qgcPal
.
mapWidgetBorderLight
DeadMouseArea
{
anchors.fill
:
parent
}
...
...
@@ -74,7 +70,7 @@ ColumnLayout {
id
:
_valuesItem
Layout.fillWidth
:
true
height
:
_valuesWidget
.
height
visible
:
widgetRoot
.
showValues
visible
:
showValues
DeadMouseArea
{
anchors.fill
:
parent
}
...
...
src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
View file @
7644653c
...
...
@@ -19,20 +19,16 @@ import QGroundControl.Palette 1.0
Rectangle
{
id
:
root
width
:
getPreferredInstrumentWidth
()
height
:
_outerRadius
*
4
+
_valuesWidget
.
height
radius
:
_outerRadius
color
:
qgcPal
.
window
border.width
:
1
border.color
:
_isSatellite
?
qgcPal
.
mapWidgetBorderLight
:
qgcPal
.
mapWidgetBorderDark
// These properties are expected to be in the Loader
// property real maxHeight
// property bool showValues - true: show value pages
property
real
_innerRadius
:
(
width
-
(
_topBottomMargin
*
2
))
/
2
property
real
_outerRadius
:
_innerRadius
+
_topBottomMargin
*
2
property
real
_defaultSize
:
ScreenTools
.
defaultFontPixelHeight
*
(
9
)
property
real
_sizeRatio
:
ScreenTools
.
isTinyScreen
?
(
width
/
_defaultSize
)
*
0.5
:
width
/
_defaultSize
property
real
_bigFontSize
:
ScreenTools
.
defaultFontPointSize
*
2.5
*
_sizeRatio
property
real
_normalFontSize
:
ScreenTools
.
defaultFontPointSize
*
1.5
*
_sizeRatio
property
real
_labelFontSize
:
ScreenTools
.
defaultFontPointSize
*
0.75
*
_sizeRatio
property
real
_spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.33
property
real
_topBottomMargin
:
(
width
*
0.05
)
/
2
property
real
_availableValueHeight
:
maxHeight
-
(
attitude
.
height
+
compass
.
height
)
...
...
@@ -62,7 +58,7 @@ Rectangle {
anchors.bottom
:
compass
.
top
width
:
parent
.
width
height
:
_valuesWidget
.
height
visible
:
widgetRoot
.
showValues
visible
:
showValues
// Prevent all clicks from going through to lower layers
DeadMouseArea
{
...
...
src/PlanView/PlanToolBarIndicators.qml
View file @
7644653c
...
...
@@ -13,7 +13,7 @@ import QGroundControl.Palette 1.0
Item
{
anchors.fill
:
parent
property
var
_planMasterController
:
mainWindow
.
planMasterControllerPlan
property
var
_planMasterController
:
mainWindow
.
planMasterControllerPlan
View
property
var
_currentMissionItem
:
mainWindow
.
currentPlanMissionItem
///< Mission item to display status for
property
var
missionItems
:
_controllerValid
?
_planMasterController
.
missionController
.
visualItems
:
undefined
...
...
src/PlanView/PlanView.qml
View file @
7644653c
...
...
@@ -182,7 +182,7 @@ Item {
Component.onCompleted
:
{
_planMasterController
.
start
(
false
/* flyView */
)
_missionController
.
setCurrentPlanViewSeqNum
(
0
,
true
)
mainWindow
.
planMasterControllerPlan
=
_planMasterController
mainWindow
.
planMasterControllerPlan
View
=
_planMasterController
}
function
waitingOnIncompleteDataMessage
(
save
)
{
...
...
src/QGCMapPalette.cc
View file @
7644653c
...
...
@@ -13,7 +13,6 @@
#include <QApplication>
#include <QPalette>
QColor
QGCMapPalette
::
_thumbJoystick
[
QGCMapPalette
::
_cColorGroups
]
=
{
QColor
(
255
,
255
,
255
,
127
),
QColor
(
0
,
0
,
0
,
127
)
};
QColor
QGCMapPalette
::
_text
[
QGCMapPalette
::
_cColorGroups
]
=
{
QColor
(
255
,
255
,
255
),
QColor
(
0
,
0
,
0
)
};
QColor
QGCMapPalette
::
_textOutline
[
QGCMapPalette
::
_cColorGroups
]
=
{
QColor
(
0
,
0
,
0
,
192
),
QColor
(
255
,
255
,
255
,
192
)
};
...
...
src/QGCMapPalette.h
View file @
7644653c
...
...
@@ -44,7 +44,6 @@ class QGCMapPalette : public QObject
Q_PROPERTY
(
QColor
text
READ
text
NOTIFY
paletteChanged
)
Q_PROPERTY
(
QColor
textOutline
READ
textOutline
NOTIFY
paletteChanged
)
Q_PROPERTY
(
QColor
thumbJoystick
READ
thumbJoystick
NOTIFY
paletteChanged
)
public:
QGCMapPalette
(
QObject
*
parent
=
nullptr
);
...
...
@@ -53,9 +52,6 @@ public:
QColor
text
(
void
)
const
{
return
_text
[
_lightColors
?
0
:
1
];
}
QColor
textOutline
(
void
)
const
{
return
_textOutline
[
_lightColors
?
0
:
1
];
}
/// Thumb joystick indicator
QColor
thumbJoystick
(
void
)
const
{
return
_thumbJoystick
[
_lightColors
?
0
:
1
];
}
bool
lightColors
(
void
)
const
{
return
_lightColors
;
}
void
setLightColors
(
bool
lightColors
);
...
...
@@ -68,7 +64,6 @@ private:
static
const
int
_cColorGroups
=
2
;
static
QColor
_thumbJoystick
[
_cColorGroups
];
static
QColor
_text
[
_cColorGroups
];
static
QColor
_textOutline
[
_cColorGroups
];
};
...
...
src/QmlControls/DropPanel.qml
View file @
7644653c
...
...
@@ -17,7 +17,6 @@ import QGroundControl.Palette 1.0
Item
{
id
:
_root
z
:
QGroundControl
.
zOrderWidgets
visible
:
false
signal
clicked
()
...
...
@@ -25,10 +24,6 @@ Item {
property
real
viewportMargins
:
0
property
var
toolStrip
width
:
radius
*
2
height
:
radius
*
2
// Should be an enum but that get's into the whole problem of creating a singleton which isn't worth the effort
readonly
property
int
dropLeft
:
1
readonly
property
int
dropRight
:
2
...
...
@@ -40,16 +35,14 @@ Item {
readonly
property
real
_dropMargin
:
ScreenTools
.
defaultFontPixelWidth
property
var
_dropEdgeTopPoint
property
real
_dropEdgeHeight
property
alias
_dropDownComponent
:
panelLoader
.
sourceComponent
property
real
_viewportMaxTop
:
0
property
real
_viewportMaxBottom
:
parent
.
parent
.
height
-
parent
.
y
property
real
_viewportMaxHeight
:
_viewportMaxBottom
-
_viewportMaxTop
property
var
_dropPanelCancel
function
show
(
panelEdgeTopPoint
,
panel
EdgeHeight
,
panel
Component
)
{
function
show
(
panelEdgeTopPoint
,
panelComponent
)
{
_dropEdgeTopPoint
=
panelEdgeTopPoint
_dropEdgeHeight
=
panelEdgeHeight
_dropDownComponent
=
panelComponent
_calcPositions
()
visible
=
true
...
...
src/QmlControls/JoystickThumbPad.qml
View file @
7644653c
import
QtQuick
2.
3
import
QtQuick
2.
12
import
QtQuick
.
Controls
1.2
import
QGroundControl
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
ScreenTools
1.0
Item
{
id
:
_joyRoot
property
alias
lightColors
:
mapPal
.
lightColors
///< true: use light colors from QGCMapPalette for drawing
property
real
xAxis
:
0
///< Value range [-1,1], negative values left stick, positive values right stick
property
real
yAxis
:
0
///< Value range [-1,1], negative values up stick, positive values down stick
property
bool
yAxisThrottle
:
false
///< true: yAxis used for throttle, range [1,0], positive value are stick up
...
...
@@ -20,8 +20,8 @@ Item {
property
bool
_processTouchPoints
:
false
property
real
stickPositionX
:
_centerXY
property
real
stickPositionY
:
yAxisThrottleCentered
?
_centerXY
:
height
QGCMapPalette
{
id
:
mapPal
}
property
color
_fgColor
:
QGroundControl
.
globalPalette
.
text
property
color
_bgColor
:
QGroundControl
.
globalPalette
.
window
onWidthChanged
:
calculateXAxis
()
onStickPositionXChanged
:
calculateXAxis
()
...
...
@@ -87,13 +87,37 @@ Item {
Image
{
anchors.fill
:
parent
source
:
lightColors
?
"
/res/JoystickBezel.png
"
:
"
/res/JoystickBezelLight.png
"
source
:
"
/res/JoystickBezelLight.png
"
mipmap
:
true
smooth
:
true
}
Rectangle
{
anchors.fill
:
parent
radius
:
width
/
2
color
:
_bgColor
opacity
:
0.5
Rectangle
{
anchors.margins
:
parent
.
width
/
4
anchors.fill
:
parent
radius
:
width
/
2
border.color
:
_fgColor
border.width
:
2
color
:
"
transparent
"
}
Rectangle
{
anchors.fill
:
parent
radius
:
width
/
2
border.color
:
_fgColor
border.width
:
2
color
:
"
transparent
"
}
}
QGCColoredImage
{
color
:
lightColors
?
"
white
"
:
"
black
"
color
:
_fgColor
visible
:
yAxisThrottle
height
:
ScreenTools
.
defaultFontPixelHeight
width
:
height
...
...
@@ -107,7 +131,7 @@ Item {
}
QGCColoredImage
{
color
:
lightColors
?
"
white
"
:
"
black
"
color
:
_fgColor
visible
:
yAxisThrottle
height
:
ScreenTools
.
defaultFontPixelHeight
width
:
height
...
...
@@ -121,7 +145,7 @@ Item {
}
QGCColoredImage
{
color
:
lightColors
?
"
white
"
:
"
black
"
color
:
_fgColor
visible
:
yAxisThrottle
height
:
ScreenTools
.
defaultFontPixelHeight
width
:
height
...
...
@@ -135,7 +159,7 @@ Item {
}
QGCColoredImage
{
color
:
lightColors
?
"
white
"
:
"
black
"
color
:
_fgColor
visible
:
yAxisThrottle
height
:
ScreenTools
.
defaultFontPixelHeight
width
:
height
...
...
@@ -149,31 +173,14 @@ Item {
}
Rectangle
{
anchors.margins
:
parent
.
width
/
4
anchors.fill
:
parent
radius
:
width
/
2
border.color
:
mapPal
.
thumbJoystick
border.width
:
2
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
}
Rectangle
{
anchors.fill
:
parent
radius
:
width
/
2
border.color
:
mapPal
.
thumbJoystick
border.width
:
2
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
}
Rectangle
{
width
:
hatWidth
height
:
hatWidth
radius
:
hatWidthHalf
border.color
:
lightColors
?
"
white
"
:
"
black
"
border.width
:
1
color
:
mapPal
.
thumbJoystick
x
:
stickPositionX
-
hatWidthHalf
y
:
stickPositionY
-
hatWidthHalf
width
:
hatWidth
height
:
hatWidth
radius
:
hatWidthHalf
border.color
:
_fgColor
border.width
:
1
color
:
Qt
.
rgba
(
_fgColor
.
r
,
_fgColor
.
g
,
_fgColor
.
b
,
0.5
)
x
:
stickPositionX
-
hatWidthHalf
y
:
stickPositionY
-
hatWidthHalf
readonly
property
real
hatWidth
:
ScreenTools
.
defaultFontPixelHeight
readonly
property
real
hatWidthHalf
:
ScreenTools
.
defaultFontPixelHeight
/
2
...
...
src/QmlControls/QGCControlDebug.qml
View file @
7644653c
...
...
@@ -12,6 +12,8 @@ import QtQuick 2.12
Item
{
property
string
name
:
"
control
"
Component.onCompleted
:
console
.
log
(
"
QGCControlDebug.onCompleted name,x,y,width,height,visible,z,parent
"
,
name
,
x
,
y
,
width
,
height
,
visible
,
z
,
parent
)
Connections
{
target
:
parent
onXChanged
:
console
.
log
(
name
,
"
xChanged
"
,
parent
.
x
)
...
...
src/QmlControls/QGCPipOverlay.qml
View file @
7644653c
...
...
@@ -20,13 +20,14 @@ Item {
width
:
_pipSize
height
:
_pipSize
*
(
9
/
16
)
z
:
pipZOrder
+
1
visible
:
item2
&&
item2
.
pipState
!==
item2
.
pipState
.
window
visible
:
item2
&&
item2
.
pipState
!==
item2
.
pipState
.
window
&&
show
property
var
item1
:
null
// Required
property
var
item2
:
null
// Optional, may come and go
property
string
item1IsFullSettingsKey
// Settings key to save whether item1 was saved in full mode
property
real
fullZOrder
:
0
// zOrder for items in full mode
property
real
pipZOrder
:
1
// zOrder for items in pip mode
property
bool
show
:
true
readonly
property
string
_pipExpandedSettingsKey
:
"
IsPIPVisible
"
...
...
@@ -44,6 +45,12 @@ Item {
_componentComplete
=
true
}
onShowChanged
:
{
if
(
_pipOrWindowItem
&&
_pipOrWindowItem
.
pipState
.
state
!==
_pipOrWindowItem
.
pipState
.
windowState
)
{
_pipOrWindowItem
.
visible
=
show
}
}
onItem2Changed
:
_initForItems
()
function
showWindow
()
{
...
...
@@ -101,6 +108,7 @@ Item {
item
.
pipState
.
windowAboutToClose
()
item
.
pipState
.
state
=
item
.
pipState
.
windowClosingState
item
.
pipState
.
state
=
item
.
pipState
.
pipState
item
.
visible
=
_root
.
show
}
}
...
...
src/QmlControls/QGCToolInsets.qml
0 → 100644
View file @
7644653c
/****************************************************************************
*
* (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
QtObject
{
property
real
leftEdgeCenterInset
:
0
property
real
leftEdgeTopInset
:
0
property
real
leftEdgeBottomInset
:
0
property
real
rightEdgeCenterInset
:
0
property
real
rightEdgeTopInset
:
0
property
real
rightEdgeBottomInset
:
0
property
real
topEdgeCenterInset
:
0
property
real
topEdgeLeftInset
:
0
property
real
topEdgeRightInset
:
0
property
real
bottomEdgeCenterInset
:
0
property
real
bottomEdgeLeftInset
:
0
property
real
bottomEdgeRightInset
:
0
signal
insetsChanged
onLeftEdgeBottomInsetChanged
:
insetsChanged
()
onLeftEdgeTopInsetChanged
:
insetsChanged
()
onLeftEdgeCenterInsetChanged
:
insetsChanged
()
onRightEdgeBottomInsetChanged
:
insetsChanged
()
onRightEdgeCenterInsetChanged
:
insetsChanged
()
onRightEdgeTopInsetChanged
:
insetsChanged
()
onBottomEdgeLeftInsetChanged
:
insetsChanged
()
onBottomEdgeRightInsetChanged
:
insetsChanged
()
onBottomEdgeCenterInsetChanged
:
insetsChanged
()
onTopEdgeLeftInsetChanged
:
insetsChanged
()
onTopEdgeRightInsetChanged
:
insetsChanged
()
onTopEdgeCenterInsetChanged
:
insetsChanged
()
}
src/QmlControls/QGroundControl/Controls/qmldir
View file @
7644653c
...
...
@@ -5,6 +5,7 @@ AppMessages 1.0 AppMessages.qml
AxisMonitor 1.0 AxisMonitor.qml
CameraCalcCamera 1.0 CameraCalcCamera.qml
CameraCalcGrid 1.0 CameraCalcGrid.qml
ContentAreaCalc 1.0 ContentAreaCalc.qml
APMSubMotorDisplay 1.0 APMSubMotorDisplay.qml
CameraSection 1.0 CameraSection.qml
ClickableColor 1.0 ClickableColor.qml
...
...
@@ -78,6 +79,7 @@ QGCTabBar 1.0 QGCTabBar.qml
QGCTabButton 1.0 QGCTabButton.qml
QGCTextField 1.0 QGCTextField.qml
QGCToolBarButton 1.0 QGCToolBarButton.qml
QGCToolInsets 1.0 QGCToolInsets.qml
QGCViewDialog 1.0 QGCViewDialog.qml
QGCViewDialogContainer 1.0 QGCViewDialogContainer.qml
QGCViewMessage 1.0 QGCViewMessage.qml
...
...
src/QmlControls/QGroundControl/FlightDisplay/qmldir
View file @
7644653c
Module QGroundControl.FlightDisplay
FlightDisplayView 1.0 FlightDisplayView.qml
FlightDisplayViewMap 1.0 FlightDisplayViewMap.qml
FlightDisplayViewVideo 1.0 FlightDisplayViewVideo.qml
FlightDisplayViewWidgets 1.0 FlightDisplayViewWidgets.qml
FlyViewAirspaceIndicator 1.0 FlyViewAirspaceIndicator.qml
FlyView 1.0 FlyView.qml
FlyViewCustomLayer 1.0 FlyViewCustomLayer.qml
FlyViewInstrumentPanel 1.0 FlyViewInstrumentPanel.qml
FlyViewMap 1.0 FlyViewMap.qml
FlyViewMissionCompleteDialog 1.0 FlyViewMissionCompleteDialog.qml
FlyViewPreFlightChecklistPopup 1.0 FlyViewPreFlightChecklistPopup.qml
FlyViewToolStrip 1.0 FlyViewToolStrip.qml
FlyViewVideo 1.0 FlyViewVideo.qml
FlyViewWidgetLayer 1.0 FlyViewWidgetLayer.qml
GuidedActionConfirm 1.0 GuidedActionConfirm.qml
GuidedActionList 1.0 GuidedActionList.qml
GuidedActionsController 1.0 GuidedActionsController.qml
...
...
@@ -20,3 +23,4 @@ PreFlightRCCheck 1.0 PreFlightRCCheck.qml
PreFlightSensorsHealthCheck 1.0 PreFlightSensorsHealthCheck.qml
PreFlightSoundCheck 1.0 PreFlightSoundCheck.qml
TerrainProgress 1.0 TerrainProgress.qml
VehicleWarnings 1.0 VehicleWarnings.qml
src/QmlControls/ToolStrip.qml
View file @
7644653c
...
...
@@ -68,6 +68,7 @@ Rectangle {
height
:
parent
.
height
contentHeight
:
toolStripColumn
.
height
flickableDirection
:
Flickable
.
VerticalFlick
clip
:
true
Column
{
id
:
toolStripColumn
...
...
@@ -113,7 +114,7 @@ Rectangle {
_root
.
clicked
(
index
,
checked
)
}
else
if
(
checked
)
{
var
panelEdgeTopPoint
=
mapToItem
(
_root
,
width
,
0
)
dropPanel
.
show
(
panelEdgeTopPoint
,
height
,
modelData
.
dropPanelComponent
)
dropPanel
.
show
(
panelEdgeTopPoint
,
modelData
.
dropPanelComponent
)
_root
.
dropped
(
index
)
}
if
(
_root
&&
buttonTemplate
)
...
...
src/api/QGCCorePlugin.cc
View file @
7644653c
...
...
@@ -122,15 +122,18 @@ QGCCorePlugin::QGCCorePlugin(QGCApplication *app, QGCToolbox* toolbox)
,
_showTouchAreas
(
false
)
,
_showAdvancedUI
(
true
)
{
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
_p
=
new
QGCCorePlugin_p
;
}
void
QGCCorePlugin
::
setToolbox
(
QGCToolbox
*
toolbox
)
{
QGCTool
::
setToolbox
(
toolbox
);
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
qmlRegisterUncreatableType
<
QGCCorePlugin
>
(
"QGroundControl.QGCCorePlugin"
,
1
,
0
,
"QGCCorePlugin"
,
"Reference only"
);
qmlRegisterUncreatableType
<
QGCOptions
>
(
"QGroundControl.QGCOptions"
,
1
,
0
,
"QGCOptions"
,
"Reference only"
);
qmlRegisterUncreatableType
<
QGCCorePlugin
>
(
"QGroundControl"
,
1
,
0
,
"QGCCorePlugin"
,
"Reference only"
);
qmlRegisterUncreatableType
<
QGCOptions
>
(
"QGroundControl"
,
1
,
0
,
"QGCOptions"
,
"Reference only"
);
qmlRegisterUncreatableType
<
QGCFlyViewOptions
>
(
"QGroundControl"
,
1
,
0
,
"QGCFlyViewOptions"
,
"Reference only"
);
//-- Handle Camera and Video Changes
connect
(
toolbox
->
multiVehicleManager
(),
&
MultiVehicleManager
::
activeVehicleChanged
,
this
,
&
QGCCorePlugin
::
_activeVehicleChanged
);
}
...
...
@@ -319,8 +322,8 @@ int QGCCorePlugin::defaultSettings()
QGCOptions
*
QGCCorePlugin
::
options
()
{
if
(
!
_p
->
defaultOptions
)
{
_p
->
defaultOptions
=
new
QGCOptions
();
if
(
!
_p
->
defaultOptions
)
{
_p
->
defaultOptions
=
new
QGCOptions
(
this
);
}
return
_p
->
defaultOptions
;
}
...
...
src/api/QGCOptions.cc
View file @
7644653c
...
...
@@ -8,6 +8,7 @@
****************************************************************************/
#include "QGCOptions.h"
#include <QtQml>
/// @file
...
...
@@ -16,53 +17,46 @@
QGCOptions
::
QGCOptions
(
QObject
*
parent
)
:
QObject
(
parent
)
,
_defaultInstrumentWidget
(
nullptr
)
{
qmlRegisterUncreatableType
<
CustomInstrumentWidget
>
(
"QGroundControl"
,
1
,
0
,
"CustomInstrumentWidget"
,
"Reference only"
);
}
CustomInstrumentWidget
*
QGCOptions
::
instrumentWidget
()
{
if
(
!
_defaultInstrumentWidget
)
{
_defaultInstrumentWidget
=
new
CustomInstrumentWidget
(
this
);
}
return
_defaultInstrumentWidget
;
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
}
QUrl
QGCOptions
::
mainToolbarUrl
()
const
QUrl
QGCOptions
::
mainToolbarUrl
()
const
{
return
QUrl
(
QStringLiteral
(
"qrc:/toolbar/MainToolBar.qml"
));
}
QUrl
QGCOptions
::
planToolbarUrl
()
const
QUrl
QGCOptions
::
planToolbarUrl
()
const
{
return
QUrl
(
QStringLiteral
(
"qrc:/qml/PlanToolBar.qml"
));
}
QColor
QGCOptions
::
toolbarBackgroundLight
()
const
QColor
QGCOptions
::
toolbarBackgroundLight
()
const
{
return
QColor
(
255
,
255
,
255
,
204
);
}
QColor
QGCOptions
::
toolbarBackgroundDark
()
const
QColor
QGCOptions
::
toolbarBackgroundDark
()
const
{
return
QColor
(
0
,
0
,
0
,
192
);
}
QUrl
QGCOptions
::
planToolbarIndicatorsUrl
()
const
QUrl
QGCOptions
::
planToolbarIndicatorsUrl
()
const
{
return
QUrl
(
QStringLiteral
(
"PlanToolBar.qml"
));
}
CustomInstrumentWidget
::
CustomInstrumentWidget
(
QObject
*
parent
)
:
QObject
(
parent
)
QGCFlyViewOptions
*
QGCOptions
::
flyViewOptions
(
void
)
{
if
(
!
_defaultFlyViewOptions
)
{
_defaultFlyViewOptions
=
new
QGCFlyViewOptions
(
this
);
}
return
_defaultFlyViewOptions
;
}
QGCFlyViewOptions
::
QGCFlyViewOptions
(
QGCOptions
*
options
,
QObject
*
parent
)
:
QObject
(
parent
)
,
_options
(
options
)
{
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
}
src/api/QGCOptions.h
View file @
7644653c
This diff is collapsed.
Click to expand it.
src/ui/MainRootWindow.qml
View file @
7644653c
...
...
@@ -58,20 +58,20 @@ ApplicationWindow {
//-- Global Scope Variables
/// Current active Vehicle
property
var
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
/// Indicates communication with vehicle is list (no heartbeats)
property
bool
communicationLost
:
activeVehicle
?
activeVehicle
.
connectionLost
:
false
property
string
formatedMessage
:
activeVehicle
?
activeVehicle
.
formatedMessage
:
""
property
bool
communicationLost
:
activeVehicle
?
activeVehicle
.
connectionLost
:
false
property
string
formatedMessage
:
activeVehicle
?
activeVehicle
.
formatedMessage
:
""
/// Indicates usable height between toolbar and footer
property
real
availableHeight
:
mainWindow
.
height
-
mainWindow
.
header
.
height
-
mainWindow
.
footer
.
height
property
real
availableHeight
:
mainWindow
.
height
-
mainWindow
.
header
.
height
-
mainWindow
.
footer
.
height
property
var
currentPlanMissionItem
:
planMasterControllerPlan
?
planMasterControllerPlan
.
missionController
.
currentPlanViewItem
:
null
property
var
planMasterControllerPlan
:
null
property
var
planMasterController
View
:
null
property
var
currentPlanMissionItem
:
planMasterControllerPlanView
?
planMasterControllerPlanView
.
missionController
.
currentPlanViewItem
:
null
property
var
planMasterControllerPlan
View
:
null
property
var
planMasterController
FlyView
:
null
readonly
property
string
navButtonWidth
:
ScreenTools
.
defaultFontPixelWidth
*
24
readonly
property
real
defaultTextHeight
:
ScreenTools
.
defaultFontPixelHeight
readonly
property
real
defaultTextWidth
:
ScreenTools
.
defaultFontPixelWidth
readonly
property
string
navButtonWidth
:
ScreenTools
.
defaultFontPixelWidth
*
24
readonly
property
real
defaultTextHeight
:
ScreenTools
.
defaultFontPixelHeight
readonly
property
real
defaultTextWidth
:
ScreenTools
.
defaultFontPixelWidth
/// Default color palette used throughout the UI
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
...
...
@@ -268,7 +268,7 @@ ApplicationWindow {
visible
:
false
onYes
:
pendingParameterWritesCloseDialog
.
check
()
function
check
()
{
if
(
planMasterControllerPlan
&&
planMasterControllerPlan
.
dirty
)
{
if
(
planMasterControllerPlan
View
&&
planMasterControllerPlanView
.
dirty
)
{
unsavedMissionCloseDialog
.
open
()
}
else
{
pendingParameterWritesCloseDialog
.
check
()
...
...
@@ -352,16 +352,9 @@ ApplicationWindow {
//-------------------------------------------------------------------------
/// Fly View
Fl
ightDispla
yView
{
FlyView
{
id
:
flightView
anchors.fill
:
parent
//-----------------------------------------------------------------
//-- Loader helper for any child, no matter how deep, to display
// elements on top of the fly (video) window.
Loader
{
id
:
rootVideoLoader
anchors.centerIn
:
parent
}
}
//-------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment