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
f970a839
Commit
f970a839
authored
Nov 03, 2015
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI Tweaks
parent
fb371f36
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
715 additions
and
633 deletions
+715
-633
qgcresources.qrc
qgcresources.qrc
+24
-27
AirframeComponent.qml
src/AutoPilotPlugins/PX4/AirframeComponent.qml
+40
-9
ReturnToHomeAltitude.svg
src/AutoPilotPlugins/PX4/Images/ReturnToHomeAltitude.svg
+81
-0
SafetyComponentArrowDown.png
src/AutoPilotPlugins/PX4/Images/SafetyComponentArrowDown.png
+0
-0
SafetyComponentHome.png
src/AutoPilotPlugins/PX4/Images/SafetyComponentHome.png
+0
-0
SafetyComponentPlane.png
src/AutoPilotPlugins/PX4/Images/SafetyComponentPlane.png
+0
-0
SafetyComponentTree.svg
src/AutoPilotPlugins/PX4/Images/SafetyComponentTree.svg
+0
-19
PowerComponent.qml
src/AutoPilotPlugins/PX4/PowerComponent.qml
+8
-3
SafetyComponent.qml
src/AutoPilotPlugins/PX4/SafetyComponent.qml
+190
-244
ParameterLoader.cc
src/FactSystem/ParameterLoader.cc
+116
-116
ParameterEditor.qml
src/QmlControls/ParameterEditor.qml
+20
-12
QGCColoredImage.qml
src/QmlControls/QGCColoredImage.qml
+14
-13
ScreenTools.qml
src/QmlControls/ScreenTools.qml
+1
-0
SubMenuButton.qml
src/QmlControls/SubMenuButton.qml
+2
-4
SetupView.qml
src/VehicleSetup/SetupView.qml
+97
-114
VehicleSummary.qml
src/VehicleSetup/VehicleSummary.qml
+104
-59
MainWindow.qml
src/ui/MainWindow.qml
+3
-4
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+15
-9
No files found.
qgcresources.qrc
View file @
f970a839
<RCC>
<RCC>
<qresource prefix="/qmlimages">
<qresource prefix="/qmlimages">
<file alias="SafetyComponentTree.svg">src/AutoPilotPlugins/PX4/Images/SafetyComponentTree.svg</file>
<file alias="AirframeComponentIcon.png">src/AutoPilotPlugins/PX4/Images/AirframeComponentIcon.png</file>
<file alias="SafetyComponentHome.png">src/AutoPilotPlugins/PX4/Images/SafetyComponentHome.png</file>
<file alias="SafetyComponentArrowDown.png">src/AutoPilotPlugins/PX4/Images/SafetyComponentArrowDown.png</file>
<file alias="SafetyComponentPlane.png">src/AutoPilotPlugins/PX4/Images/SafetyComponentPlane.png</file>
<file alias="VehicleDown.png">src/AutoPilotPlugins/PX4/Images/VehicleDown.png</file>
<file alias="VehicleUpsideDown.png">src/AutoPilotPlugins/PX4/Images/VehicleUpsideDown.png</file>
<file alias="VehicleLeft.png">src/AutoPilotPlugins/PX4/Images/VehicleLeft.png</file>
<file alias="VehicleRight.png">src/AutoPilotPlugins/PX4/Images/VehicleRight.png</file>
<file alias="VehicleNoseDown.png">src/AutoPilotPlugins/PX4/Images/VehicleNoseDown.png</file>
<file alias="VehicleTailDown.png">src/AutoPilotPlugins/PX4/Images/VehicleTailDown.png</file>
<file alias="VehicleDownRotate.png">src/AutoPilotPlugins/PX4/Images/VehicleDownRotate.png</file>
<file alias="VehicleLeftRotate.png">src/AutoPilotPlugins/PX4/Images/VehicleLeftRotate.png</file>
<file alias="VehicleNoseDownRotate.png">src/AutoPilotPlugins/PX4/Images/VehicleNoseDownRotate.png</file>
<file alias="AirframeStandardPlane.png">src/AutoPilotPlugins/PX4/Images/AirframeStandardPlane.png</file>
<file alias="AirframeFlyingWing.png">src/AutoPilotPlugins/PX4/Images/AirframeFlyingWing.png</file>
<file alias="AirframeFlyingWing.png">src/AutoPilotPlugins/PX4/Images/AirframeFlyingWing.png</file>
<file alias="AirframeQuadRotorX.png">src/AutoPilotPlugins/PX4/Images/AirframeQuadRotorX.png</file>
<file alias="AirframeQuadRotorPlus.png">src/AutoPilotPlugins/PX4/Images/AirframeQuadRotorPlus.png</file>
<file alias="AirframeOctoRotorX.png">src/AutoPilotPlugins/PX4/Images/AirframeOctoRotorX.png</file>
<file alias="AirframeOctoRotorPlus.png">src/AutoPilotPlugins/PX4/Images/AirframeOctoRotorPlus.png</file>
<file alias="AirframeHexaRotorX.png">src/AutoPilotPlugins/PX4/Images/AirframeHexaRotorX.png</file>
<file alias="AirframeHexaRotorPlus.png">src/AutoPilotPlugins/PX4/Images/AirframeHexaRotorPlus.png</file>
<file alias="AirframeHexaRotorPlus.png">src/AutoPilotPlugins/PX4/Images/AirframeHexaRotorPlus.png</file>
<file alias="AirframeHexaRotorX.png">src/AutoPilotPlugins/PX4/Images/AirframeHexaRotorX.png</file>
<file alias="AirframeOctoRotorPlus.png">src/AutoPilotPlugins/PX4/Images/AirframeOctoRotorPlus.png</file>
<file alias="AirframeOctoRotorX.png">src/AutoPilotPlugins/PX4/Images/AirframeOctoRotorX.png</file>
<file alias="AirframeQuadRotorH.png">src/AutoPilotPlugins/PX4/Images/AirframeQuadRotorH.png</file>
<file alias="AirframeQuadRotorH.png">src/AutoPilotPlugins/PX4/Images/AirframeQuadRotorH.png</file>
<file alias="AirframeQuadRotorPlus.png">src/AutoPilotPlugins/PX4/Images/AirframeQuadRotorPlus.png</file>
<file alias="AirframeQuadRotorX.png">src/AutoPilotPlugins/PX4/Images/AirframeQuadRotorX.png</file>
<file alias="AirframeSimulation.png">src/AutoPilotPlugins/PX4/Images/AirframeSimulation.png</file>
<file alias="AirframeSimulation.png">src/AutoPilotPlugins/PX4/Images/AirframeSimulation.png</file>
<file alias="AirframeStandardPlane.png">src/AutoPilotPlugins/PX4/Images/AirframeStandardPlane.png</file>
<file alias="arrow-down.png">src/QmlControls/arrow-down.png</file>
<file alias="arrow-down.png">src/QmlControls/arrow-down.png</file>
<file alias="subMenuButtonImage.png">resources/CogWheels.png</file>
<file alias="SensorsComponentIcon.png">src/AutoPilotPlugins/PX4/Images/SensorsComponentIcon.png</file>
<file alias="RadioComponentIcon.png">src/AutoPilotPlugins/PX4/Images/RadioComponentIcon.png</file>
<file alias="FlightModesComponentIcon.png">src/AutoPilotPlugins/PX4/Images/FlightModesComponentIcon.png</file>
<file alias="AirframeComponentIcon.png">src/AutoPilotPlugins/PX4/Images/AirframeComponentIcon.png</file>
<file alias="SafetyComponentIcon.png">src/AutoPilotPlugins/PX4/Images/SafetyComponentIcon.png</file>
<file alias="PowerComponentIcon.png">src/AutoPilotPlugins/PX4/Images/PowerComponentIcon.png</file>
<file alias="FirmwareUpgradeIcon.png">src/VehicleSetup/FirmwareUpgradeIcon.png</file>
<file alias="FirmwareUpgradeIcon.png">src/VehicleSetup/FirmwareUpgradeIcon.png</file>
<file alias="
VehicleSummaryIcon.png">src/VehicleSetup/VehicleSummary
Icon.png</file>
<file alias="
FlightModesComponentIcon.png">src/AutoPilotPlugins/PX4/Images/FlightModesComponent
Icon.png</file>
<file alias="PowerComponentBattery_01cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_01cell.svg</file>
<file alias="PowerComponentBattery_01cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_01cell.svg</file>
<file alias="PowerComponentBattery_02cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_02cell.svg</file>
<file alias="PowerComponentBattery_02cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_02cell.svg</file>
<file alias="PowerComponentBattery_03cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_03cell.svg</file>
<file alias="PowerComponentBattery_03cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_03cell.svg</file>
<file alias="PowerComponentBattery_04cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_04cell.svg</file>
<file alias="PowerComponentBattery_04cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_04cell.svg</file>
<file alias="PowerComponentBattery_05cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_05cell.svg</file>
<file alias="PowerComponentBattery_05cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_05cell.svg</file>
<file alias="PowerComponentBattery_06cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_06cell.svg</file>
<file alias="PowerComponentBattery_06cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_06cell.svg</file>
<file alias="PowerComponentIcon.png">src/AutoPilotPlugins/PX4/Images/PowerComponentIcon.png</file>
<file alias="RadioComponentIcon.png">src/AutoPilotPlugins/PX4/Images/RadioComponentIcon.png</file>
<file alias="ReturnToHomeAltitude.svg">src/AutoPilotPlugins/PX4/Images/ReturnToHomeAltitude.svg</file>
<file alias="SafetyComponentIcon.png">src/AutoPilotPlugins/PX4/Images/SafetyComponentIcon.png</file>
<file alias="SensorsComponentIcon.png">src/AutoPilotPlugins/PX4/Images/SensorsComponentIcon.png</file>
<file alias="subMenuButtonImage.png">resources/CogWheels.png</file>
<file alias="VehicleDown.png">src/AutoPilotPlugins/PX4/Images/VehicleDown.png</file>
<file alias="VehicleDownRotate.png">src/AutoPilotPlugins/PX4/Images/VehicleDownRotate.png</file>
<file alias="VehicleLeft.png">src/AutoPilotPlugins/PX4/Images/VehicleLeft.png</file>
<file alias="VehicleLeftRotate.png">src/AutoPilotPlugins/PX4/Images/VehicleLeftRotate.png</file>
<file alias="VehicleNoseDown.png">src/AutoPilotPlugins/PX4/Images/VehicleNoseDown.png</file>
<file alias="VehicleNoseDownRotate.png">src/AutoPilotPlugins/PX4/Images/VehicleNoseDownRotate.png</file>
<file alias="VehicleRight.png">src/AutoPilotPlugins/PX4/Images/VehicleRight.png</file>
<file alias="VehicleSummaryIcon.png">src/VehicleSetup/VehicleSummaryIcon.png</file>
<file alias="VehicleTailDown.png">src/AutoPilotPlugins/PX4/Images/VehicleTailDown.png</file>
<file alias="VehicleUpsideDown.png">src/AutoPilotPlugins/PX4/Images/VehicleUpsideDown.png</file>
<file alias="attitudeDial.svg">src/FlightMap/Images/attitudeDial.svg</file>
<file alias="attitudeDial.svg">src/FlightMap/Images/attitudeDial.svg</file>
<file alias="attitudeInstrument.svg">src/FlightMap/Images/attitudeInstrument.svg</file>
<file alias="attitudeInstrument.svg">src/FlightMap/Images/attitudeInstrument.svg</file>
...
...
src/AutoPilotPlugins/PX4/AirframeComponent.qml
View file @
f970a839
...
@@ -39,6 +39,28 @@ QGCView {
...
@@ -39,6 +39,28 @@ QGCView {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
property
real
_minW
:
ScreenTools
.
defaultFontPixelWidth
*
30
property
real
_boxWidth
:
_minW
property
real
_boxSpace
:
ScreenTools
.
defaultFontPixelWidth
function
computeDimensions
()
{
var
sw
=
0
var
rw
=
0
var
idx
=
Math
.
floor
(
scroll
.
width
/
(
_minW
+
ScreenTools
.
defaultFontPixelWidth
))
if
(
idx
<
1
)
{
_boxWidth
=
scroll
.
width
_boxSpace
=
0
}
else
{
_boxSpace
=
0
if
(
idx
>
1
)
{
_boxSpace
=
ScreenTools
.
defaultFontPixelWidth
sw
=
_boxSpace
*
(
idx
-
1
)
}
rw
=
scroll
.
width
-
sw
_boxWidth
=
rw
/
idx
}
}
AirframeComponentController
{
AirframeComponentController
{
id
:
controller
id
:
controller
factPanel
:
panel
factPanel
:
panel
...
@@ -127,16 +149,25 @@ QGCView {
...
@@ -127,16 +149,25 @@ QGCView {
width
:
10
width
:
10
}
}
ScrollView
{
Flickable
{
id
:
scroll
id
:
scroll
anchors.top
:
lastSpacer
.
bottom
anchors.top
:
lastSpacer
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
width
:
parent
.
width
width
:
parent
.
width
horizontalScrollBarPolicy
:
Qt
.
ScrollBarAlwaysOff
clip
:
true
contentHeight
:
flowView
.
height
contentWidth
:
parent
.
width
boundsBehavior
:
Flickable
.
StopAtBounds
flickableDirection
:
Flickable
.
VerticalFlick
onWidthChanged
:
{
computeDimensions
()
}
Flow
{
Flow
{
id
:
flowView
width
:
scroll
.
width
width
:
scroll
.
width
spacing
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
_boxSpace
ExclusiveGroup
{
ExclusiveGroup
{
id
:
airframeTypeExclusive
id
:
airframeTypeExclusive
...
@@ -148,8 +179,8 @@ QGCView {
...
@@ -148,8 +179,8 @@ QGCView {
// Outer summary item rectangle
// Outer summary item rectangle
Rectangle
{
Rectangle
{
id
:
airframeBackground
id
:
airframeBackground
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
width
:
_boxWidth
height
:
width
*
.
7
5
height
:
ScreenTools
.
defaultFontPixelWidth
*
22.
5
color
:
(
modelData
.
name
!=
controller
.
currentAirframeType
)
?
qgcPal
.
windowShade
:
qgcPal
.
buttonHighlight
color
:
(
modelData
.
name
!=
controller
.
currentAirframeType
)
?
qgcPal
.
windowShade
:
qgcPal
.
buttonHighlight
readonly
property
real
titleHeight
:
ScreenTools
.
defaultFontPixelHeight
*
1.75
readonly
property
real
titleHeight
:
ScreenTools
.
defaultFontPixelHeight
*
1.75
...
...
src/AutoPilotPlugins/PX4/Images/ReturnToHomeAltitude.svg
0 → 100644
View file @
f970a839
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"0 0 144 72"
style=
"enable-background:new 0 0 144 72;"
xml:space=
"preserve"
>
<style
type=
"text/css"
>
.st0{opacity:0.5;}
.st1{fill:#FFFFFF;}
.st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;}
.st3{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;stroke-dasharray:3.0478,3.0478;}
.st4{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;stroke-dasharray:3.6243,3.6243;}
.st5{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;stroke-dasharray:3.0018,3.0018;}
.st6{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;stroke-dasharray:2.9665,2.9665;}
</style>
<g
class=
"st0"
>
<title>
Layer 1
</title>
<g
id=
"layer1_1_"
>
<g
id=
"g4623_1_"
>
<path
id=
"rect2192_1_"
class=
"st1"
d=
"M77.2,59.3h3.4v7.1c-1,0.5-2.2,0.6-3.4,0V59.3z"
/>
<path
id=
"path1307_1_"
class=
"st1"
d=
"M90.9,60.2c-7.6-1.6-15.9,1.7-24,0c5.5-5.1,7.1-15.3,12-20.8
C82.8,44.7,85.2,55.1,90.9,60.2z"
/>
<path
id=
"path2183_1_"
class=
"st1"
d=
"M88.5,46.8c-6.1-1.2-12.7,1.4-19.2,0c4.4-4.1,5.7-12.3,9.6-16.6C82,34.5,84,42.8,88.5,46.8
z"
/>
<path
id=
"path2185_1_"
class=
"st1"
d=
"M86.3,36.2c-4.7-1-9.8,1-14.8,0c3.4-3.1,4.4-9.5,7.4-12.8C81.3,26.7,82.8,33.1,86.3,36.2z"
/>
</g>
</g>
</g>
<path
class=
"st1"
d=
"M143,37.1c0.1,0.4,0,0.8-0.3,1.1l-6.4,6.1l-1.1,7.7c-0.1,0.4-0.3,0.7-0.7,0.8s-0.7,0.1-1-0.1l-3.3-2.5l-7.9,7.6
c-0.1,0.1-0.2,0.2-0.3,0.2c-0.2,0.1-0.3,0.1-0.5,0.1c-0.3-0.1-0.6-0.2-0.8-0.5l-16.6-27.2c-0.2-0.4-0.2-0.8,0-1.1
c0.1-0.2,0.3-0.3,0.5-0.4c0.2-0.1,0.4-0.1,0.6,0l37,7.7C142.6,36.4,142.9,36.7,143,37.1L143,37.1z M111.3,32L134.8,43l0.1-0.1
c0-0.1,0.1-0.1,0.1-0.2l4.9-4.7L111.3,32z M108,31.6l25.5,18.1l0.8-5.8L108,31.6z M108.6,33.5l13.3,21.7l6.9-6.7
c0.1-0.1,0.3-0.2,0.6-0.4L108.6,33.5z"
/>
<g>
<polygon
class=
"st1"
points=
"32,56.6 16.7,38.7 1.4,56.6 5.3,56.6 5.3,69.3 12.9,69.3 12.9,59.1 20.6,59.1 20.6,69.3 28.2,69.3
28.2,56.6 "
/>
</g>
<g>
<title>
Layer 1
</title>
<g
id=
"layer1"
>
<g
id=
"g4623"
>
<path
id=
"rect2192"
class=
"st1"
d=
"M69,61.6h3.9v8.3c-1.1,0.5-2.5,0.7-3.9,0V61.6z"
/>
<path
id=
"path1307"
class=
"st1"
d=
"M84.9,62.6c-8.9-1.8-18.4,2-27.8,0c6.4-5.9,8.3-17.8,13.9-24.1C75.5,44.7,78.4,56.7,84.9,62.6
z"
/>
<path
id=
"path2183"
class=
"st1"
d=
"M82.1,47.1c-7.1-1.4-14.7,1.6-22.2,0C65,42.4,66.5,32.9,71,27.9
C74.6,32.8,76.9,42.4,82.1,47.1z"
/>
<path
id=
"path2185"
class=
"st1"
d=
"M79.5,34.9c-5.5-1.1-11.3,1.2-17.1,0c4-3.6,5.1-11,8.6-14.8C73.8,23.8,75.5,31.2,79.5,34.9z"
/>
</g>
</g>
</g>
<g>
<g>
<line
class=
"st2"
x1=
"77.3"
y1=
"5.4"
x2=
"78.8"
y2=
"5.4"
/>
<line
class=
"st3"
x1=
"81.8"
y1=
"5.4"
x2=
"123"
y2=
"5.4"
/>
<polyline
class=
"st2"
points=
"124.5,5.4 126,5.4 126,6.9 "
/>
<line
class=
"st4"
x1=
"126"
y1=
"10.5"
x2=
"126"
y2=
"15.9"
/>
<line
class=
"st2"
x1=
"126"
y1=
"17.8"
x2=
"126"
y2=
"19.3"
/>
<g>
<polygon
class=
"st1"
points=
"72,5.4 79.5,8.4 77.7,5.4 79.5,2.3 "
/>
</g>
<g>
<g>
<polygon
class=
"st1"
points=
"123.3,21.1 123.5,21 125.6,18.8 125.6,25.3 123.3,27.6 "
/>
<path
class=
"st1"
d=
"M128.6,27.6l-2.2-2.3v-6.5c0.6,0.8,1.4,1.6,2.2,2.3V27.6z"
/>
</g>
</g>
</g>
</g>
<g>
<g>
<line
class=
"st2"
x1=
"16.7"
y1=
"29.4"
x2=
"16.7"
y2=
"27.9"
/>
<line
class=
"st5"
x1=
"16.7"
y1=
"24.9"
x2=
"16.7"
y2=
"8.4"
/>
<polyline
class=
"st2"
points=
"16.7,6.9 16.7,5.4 18.2,5.4 "
/>
<line
class=
"st6"
x1=
"21.2"
y1=
"5.4"
x2=
"67.2"
y2=
"5.4"
/>
<line
class=
"st2"
x1=
"68.7"
y1=
"5.4"
x2=
"70.2"
y2=
"5.4"
/>
<g>
<polygon
class=
"st1"
points=
"16.7,34.7 19.8,27.2 16.7,29 13.7,27.2 "
/>
</g>
</g>
</g>
</svg>
src/AutoPilotPlugins/PX4/Images/SafetyComponentArrowDown.png
deleted
100644 → 0
View file @
fb371f36
210 Bytes
src/AutoPilotPlugins/PX4/Images/SafetyComponentHome.png
deleted
100644 → 0
View file @
fb371f36
628 Bytes
src/AutoPilotPlugins/PX4/Images/SafetyComponentPlane.png
deleted
100644 → 0
View file @
fb371f36
502 Bytes
src/AutoPilotPlugins/PX4/Images/SafetyComponentTree.svg
deleted
100644 → 0
View file @
fb371f36
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"356 -168 306 480"
enable-background=
"new 356 -168 306 480"
xml:space=
"preserve"
>
<g>
<title>
Layer 1
</title>
<g
id=
"layer1"
>
<g
id=
"g4623"
>
<path
id=
"rect2192"
fill=
"#FFFFFF"
d=
"M484.7,225.1h36.7v77.8c-10.8,5.1-23.7,6.6-36.7,0V225.1z"
/>
<path
id=
"path1307"
fill=
"#FFFFFF"
d=
"M633.7,234.3c-83.3-16.9-172.7,18.5-261.3,0C432.8,178.9,450.2,67.3,503,8
C545.8,65.7,572.4,178.9,633.7,234.3z"
/>
<path
id=
"path2183"
fill=
"#FFFFFF"
d=
"M607.5,89.1c-66.6-13.5-138.1,14.8-208.9,0C446.9,44.8,460.8-44.4,503-91.8
C537.2-45.7,558.5,44.8,607.5,89.1z"
/>
<path
id=
"path2185"
fill=
"#FFFFFF"
d=
"M583.6-26.4c-51.3-10.4-106.5,11.4-161.1,0c37.3-34.2,48-103,80.6-139.5
C529.4-130.3,545.8-60.5,583.6-26.4z"
/>
</g>
</g>
</g>
</svg>
src/AutoPilotPlugins/PX4/PowerComponent.qml
View file @
f970a839
...
@@ -106,13 +106,15 @@ QGCView {
...
@@ -106,13 +106,15 @@ QGCView {
Flickable
{
Flickable
{
anchors.fill
:
parent
anchors.fill
:
parent
flickableDirection
:
Flickable
.
VerticalFlick
clip
:
true
contentHeight
:
innerColumn
.
height
contentHeight
:
innerColumn
.
height
contentWidth
:
panel
.
width
boundsBehavior
:
Flickable
.
StopAtBounds
flickableDirection
:
Flickable
.
VerticalFlick
Column
{
Column
{
id
:
innerColumn
id
:
innerColumn
anchors.left
:
parent
.
left
width
:
panel
.
width
anchors.right
:
parent
.
right
spacing
:
ScreenTools
.
defaultFontPixelHeight
spacing
:
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
QGCLabel
{
...
@@ -246,6 +248,7 @@ QGCView {
...
@@ -246,6 +248,7 @@ QGCView {
QGCButton
{
QGCButton
{
text
:
"
Calibrate
"
text
:
"
Calibrate
"
width
:
ScreenTools
.
defaultFontPixelWidth
*
20
onClicked
:
controller
.
calibrateEsc
()
onClicked
:
controller
.
calibrateEsc
()
}
}
}
}
...
@@ -279,11 +282,13 @@ QGCView {
...
@@ -279,11 +282,13 @@ QGCView {
QGCButton
{
QGCButton
{
text
:
"
Start Configuration
"
text
:
"
Start Configuration
"
width
:
ScreenTools
.
defaultFontPixelWidth
*
20
onClicked
:
controller
.
busConfigureActuators
()
onClicked
:
controller
.
busConfigureActuators
()
}
}
QGCButton
{
QGCButton
{
text
:
"
End Configuration
"
text
:
"
End Configuration
"
width
:
ScreenTools
.
defaultFontPixelWidth
*
20
onClicked
:
controller
.
StopBusConfigureActuators
()
onClicked
:
controller
.
StopBusConfigureActuators
()
}
}
}
}
...
...
src/AutoPilotPlugins/PX4/SafetyComponent.qml
View file @
f970a839
...
@@ -21,9 +21,11 @@
...
@@ -21,9 +21,11 @@
======================================================================*/
======================================================================*/
import
QtQuick
2.
2
import
QtQuick
2.
5
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Layouts
1.2
import
QtGraphicalEffects
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactControls
1.0
import
QGroundControl
.
FactControls
1.0
...
@@ -31,259 +33,202 @@ import QGroundControl.Palette 1.0
...
@@ -31,259 +33,202 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCView
{
QGCView
{
id
:
rootQGCView
id
:
_safetyView
viewPanel
:
view
viewPanel
:
panel
anchors.fill
:
parent
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
FactPanelController
{
id
:
controller
;
factPanel
:
rootQGCView
}
property
int
flightLineWidth
:
2
// width of lines for flight graphic
property
real
firstColumnWidth
:
ScreenTools
.
defaultFontPixelWidth
*
28
property
int
loiterAltitudeColumnWidth
:
180
// width of loiter altitude column
property
real
secondColumnWidth
:
ScreenTools
.
defaultFontPixelWidth
*
25
property
int
shadedMargin
:
20
// margin inset for shaded areas
property
int
controlVerticalSpacing
:
10
// vertical spacing between controls
property
int
homeWidth
:
50
// width of home graphic
property
int
planeWidth
:
40
// width of plane graphic
property
int
arrowToHomeSpacing
:
20
// space between down arrow and home graphic
property
int
arrowWidth
:
18
// width for arrow graphic
property
int
firstColumnWidth
:
220
// Width of first column in return home triggers area
QGCView
{
QGCViewPanel
{
id
:
view
id
:
panel
anchors.fill
:
parent
Flickable
{
clip
:
true
anchors.fill
:
parent
anchors.fill
:
parent
contentHeight
:
safetyColumn
.
height
contentWidth
:
parent
.
width
boundsBehavior
:
Flickable
.
StopAtBounds
flickableDirection
:
Flickable
.
VerticalFlick
Column
{
Column
{
anchors.fill
:
parent
id
:
safetyColumn
width
:
_safetyView
.
width
//-----------------------------------------------------------------
//-----------------------------------------------------------------
//-- Return Home Triggers
//-- Return Home Triggers
QGCLabel
{
text
:
"
Triggers For Return Home
"
;
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
;
}
QGCLabel
{
text
:
"
Triggers For Return Home
"
;
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
;
}
Item
{
height
:
10
;
width
:
10
}
// spacer
Item
{
height
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
;
width
:
1
}
// spacer
Rectangle
{
Rectangle
{
width
:
parent
.
width
width
:
parent
.
width
height
:
triggerColumn
.
h
eight
height
:
triggerColumn
.
height
+
ScreenTools
.
defaultFontPixelH
eight
color
:
palette
.
windowShade
color
:
palette
.
windowShade
Column
{
Column
{
id
:
triggerColumn
id
:
triggerColumn
spacing
:
controlVerticalSpacing
width
:
parent
.
width
anchors.margins
:
shadedMargin
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
Item
{
height
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
;
width
:
1
}
// spacer
// Top margin
Item
{
height
:
1
;
width
:
10
}
Row
{
Row
{
spacing
:
10
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
"
RC Transmitter Signal Loss
"
;
width
:
firstColumnWidth
;
anchors.baseline
:
rcLossField
.
baseline
}
QGCLabel
{
QGCLabel
{
text
:
"
Return Home after
"
;
anchors.baseline
:
rcLossField
.
baseline
}
text
:
"
RC Transmitter Signal Loss
"
width
:
firstColumnWidth
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
text
:
"
Return Home after
"
width
:
secondColumnWidth
anchors.verticalCenter
:
parent
.
verticalCenter
}
FactTextField
{
FactTextField
{
id
:
rcLossField
id
:
rcLossField
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_RC_LOSS_T
"
)
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_RC_LOSS_T
"
)
showUnits
:
true
showUnits
:
true
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
}
}
Row
{
Row
{
spacing
:
10
spacing
:
ScreenTools
.
defaultFontPixelWidth
FactCheckBox
{
FactCheckBox
{
id
:
telemetryTimeoutCheckbox
id
:
telemetryTimeoutCheckbox
anchors.baseline
:
telemetryLossField
.
baseline
width
:
firstColumnWidth
width
:
firstColumnWidth
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_DL_LOSS_EN
"
)
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_DL_LOSS_EN
"
)
checkedValue
:
1
checkedValue
:
1
uncheckedValue
:
0
uncheckedValue
:
0
text
:
"
Telemetry Signal Timeout
"
text
:
"
Telemetry Signal Timeout
"
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
text
:
"
Return Home after
"
width
:
secondColumnWidth
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
QGCLabel
{
text
:
"
Return Home after
"
;
anchors.baseline
:
telemetryLossField
.
baseline
}
FactTextField
{
FactTextField
{
id
:
telemetryLossField
id
:
telemetryLossField
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_DL_LOSS_T
"
)
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_DL_LOSS_T
"
)
showUnits
:
true
showUnits
:
true
enabled
:
telemetryTimeoutCheckbox
.
checked
enabled
:
telemetryTimeoutCheckbox
.
checked
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
}
}
Item
{
height
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
;
width
:
1
}
// spacer
// Bottom margin
Item
{
height
:
1
;
width
:
10
}
}
}
}
}
Item
{
height
:
20
;
width
:
10
}
// spacer
Item
{
height
:
ScreenTools
.
defaultFontPixelHeight
;
width
:
1
}
// spacer
//-----------------------------------------------------------------
//-----------------------------------------------------------------
//-- Return Home Settings
//-- Return Home Settings
QGCLabel
{
text
:
"
Return Home Settings
"
;
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
;
}
QGCLabel
{
text
:
"
Return Home Settings
"
;
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
;
}
Item
{
height
:
10
;
width
:
10
}
// spacer
Item
{
height
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
;
width
:
1
}
// spacer
Rectangle
{
Rectangle
{
width
:
parent
.
width
width
:
parent
.
width
height
:
settingsColumn
.
height
height
:
settingsRow
.
height
color
:
palette
.
windowShade
color
:
palette
.
windowShade
Column
{
Row
{
id
:
settingsColumn
id
:
settingsRow
width
:
parent
.
width
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.margins
:
shadedMargin
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
spacing
:
ScreenTools
.
defaultFontPixelWidth
Item
{
height
:
shadedMargin
;
width
:
10
}
// top margin
// This item is the holder for the climb alt and loiter seconds fields
Item
{
Item
{
width
:
firstColumnWidth
height
:
firstColumnWidth
*
0.65
Image
{
id
:
icon
width
:
parent
.
width
width
:
parent
.
width
height
:
climbAltitudeColumn
.
height
height
:
parent
.
width
*
0.5
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
visible
:
false
source
:
"
/qmlimages/ReturnToHomeAltitude.svg
"
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
ColorOverlay
{
id
:
iconOverlay
anchors.fill
:
icon
source
:
icon
color
:
palette
.
button
}
anchors.verticalCenter
:
parent
.
verticalCenter
}
Column
{
Column
{
id
:
climbAltitudeColumn
width
:
parent
.
width
-
firstColumnWidth
spacing
:
controlVerticalSpacing
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
"
Climb to altitude of
"
}
anchors.verticalCenter
:
parent
.
verticalCenter
Item
{
height
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
;
width
:
1
}
// spacer
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
"
Climb to altitude of
"
width
:
secondColumnWidth
anchors.verticalCenter
:
parent
.
verticalCenter
}
FactTextField
{
FactTextField
{
id
:
climbField
id
:
climbField
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_RETURN_ALT
"
)
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_RETURN_ALT
"
)
showUnits
:
true
showUnits
:
true
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
}
}
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
Column
{
x
:
flightGraphic
.
width
-
200
spacing
:
controlVerticalSpacing
QGCCheckBox
{
QGCCheckBox
{
id
:
homeLoiterCheckbox
id
:
homeLoiterCheckbox
width
:
secondColumnWidth
checked
:
fact
.
value
>
0
checked
:
fact
.
value
>
0
text
:
"
Loiter at Home altitude for
"
text
:
"
Loiter at Home altitude for
"
anchors.verticalCenter
:
parent
.
verticalCenter
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_LAND_DELAY
"
)
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_LAND_DELAY
"
)
onClicked
:
{
onClicked
:
{
fact
.
value
=
checked
?
60
:
-
1
fact
.
value
=
checked
?
60
:
-
1
}
}
}
}
FactTextField
{
FactTextField
{
id
:
landDelayField
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_LAND_DELAY
"
)
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_LAND_DELAY
"
)
showUnits
:
true
showUnits
:
true
enabled
:
homeLoiterCheckbox
.
checked
==
true
enabled
:
homeLoiterCheckbox
.
checked
===
true
}
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
Item
{
height
:
20
;
width
:
10
}
// spacer
// This row holds the flight graphic and the home loiter alt column
Row
{
width
:
parent
.
width
spacing
:
20
// Flight graphic
Item
{
id
:
flightGraphic
width
:
parent
.
width
-
loiterAltitudeColumnWidth
height
:
200
// controls the height of the flight graphic
Rectangle
{
x
:
planeWidth
/
2
height
:
planeImage
.
y
-
5
width
:
flightLineWidth
color
:
palette
.
button
}
Rectangle
{
x
:
planeWidth
/
2
height
:
flightLineWidth
width
:
parent
.
width
-
x
color
:
palette
.
button
}
Rectangle
{
x
:
parent
.
width
-
flightLineWidth
height
:
parent
.
height
-
homeWidth
-
arrowToHomeSpacing
width
:
flightLineWidth
color
:
palette
.
button
}
QGCColoredImage
{
id
:
planeImage
y
:
parent
.
height
-
planeWidth
-
40
source
:
"
/qmlimages/SafetyComponentPlane.png
"
fillMode
:
Image
.
PreserveAspectFit
width
:
planeWidth
height
:
planeWidth
smooth
:
true
color
:
palette
.
button
}
QGCColoredImage
{
x
:
planeWidth
+
70
y
:
parent
.
height
-
height
-
20
width
:
80
height
:
parent
.
height
/
2
source
:
"
/qmlimages/SafetyComponentTree.svg
"
fillMode
:
Image
.
Stretch
smooth
:
true
color
:
palette
.
windowShadeDark
}
QGCColoredImage
{
x
:
planeWidth
+
15
y
:
parent
.
height
-
height
width
:
100
height
:
parent
.
height
*
.
75
source
:
"
/qmlimages/SafetyComponentTree.svg
"
fillMode
:
Image
.
PreserveAspectFit
smooth
:
true
color
:
palette
.
button
}
}
QGCColoredImage
{
x
:
parent
.
width
-
(
arrowWidth
/
2
)
-
1
y
:
parent
.
height
-
homeWidth
-
arrowToHomeSpacing
-
2
source
:
"
/qmlimages/SafetyComponentArrowDown.png
"
fillMode
:
Image
.
PreserveAspectFit
width
:
arrowWidth
height
:
arrowWidth
smooth
:
true
color
:
palette
.
button
}
}
Row
{
QGCColoredImage
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
id
:
homeImage
x
:
parent
.
width
-
(
homeWidth
/
2
)
y
:
parent
.
height
-
homeWidth
source
:
"
/qmlimages/SafetyComponentHome.png
"
fillMode
:
Image
.
PreserveAspectFit
width
:
homeWidth
height
:
homeWidth
smooth
:
true
color
:
palette
.
button
}
}
Column
{
spacing
:
controlVerticalSpacing
QGCLabel
{
QGCLabel
{
text
:
"
Home loiter altitude
"
;
text
:
"
Home loiter altitude
"
;
color
:
palette
.
text
;
color
:
palette
.
text
;
enabled
:
homeLoiterCheckbox
.
checked
===
true
enabled
:
homeLoiterCheckbox
.
checked
===
true
width
:
secondColumnWidth
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
FactTextField
{
FactTextField
{
id
:
descendField
;
id
:
descendField
;
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_DESCEND_ALT
"
)
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_DESCEND_ALT
"
)
enabled
:
homeLoiterCheckbox
.
checked
===
true
enabled
:
homeLoiterCheckbox
.
checked
===
true
showUnits
:
true
showUnits
:
true
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
}
}
Item
{
height
:
ScreenTools
.
defaultFontPixelHeight
;
width
:
1
}
// spacer
}
}
Item
{
height
:
shadedMargin
;
width
:
10
}
// bottom margin
}
}
}
}
...
@@ -307,5 +252,6 @@ QGCView {
...
@@ -307,5 +252,6 @@ QGCView {
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
"
NAV_DLL_OBC
"
)
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
"
NAV_DLL_OBC
"
)
}
}
}
}
}
// QGCVIew
}
}
}
}
src/FactSystem/ParameterLoader.cc
View file @
f970a839
...
@@ -835,7 +835,7 @@ void ParameterLoader::_checkInitialLoadComplete(void)
...
@@ -835,7 +835,7 @@ void ParameterLoader::_checkInitialLoadComplete(void)
foreach
(
UASMessage
*
msg
,
msgHandler
->
messages
())
{
foreach
(
UASMessage
*
msg
,
msgHandler
->
messages
())
{
if
(
msg
->
severityIsError
())
{
if
(
msg
->
severityIsError
())
{
if
(
!
firstError
)
{
if
(
!
firstError
)
{
errors
+=
"
\n
"
;
errors
+=
"
<br>
"
;
}
}
errors
+=
" - "
;
errors
+=
" - "
;
errors
+=
msg
->
getText
();
errors
+=
msg
->
getText
();
...
@@ -847,7 +847,7 @@ void ParameterLoader::_checkInitialLoadComplete(void)
...
@@ -847,7 +847,7 @@ void ParameterLoader::_checkInitialLoadComplete(void)
msgHandler
->
unlockAccess
();
msgHandler
->
unlockAccess
();
if
(
errorsFound
)
{
if
(
errorsFound
)
{
QString
errorMsg
=
QString
(
"
Errors were detected during vehicle startup. You should resolve these prior to flight.
\n
%1"
).
arg
(
errors
);
QString
errorMsg
=
QString
(
"
<b>Critical safety issue detected:</b><br>
%1"
).
arg
(
errors
);
qgcApp
()
->
showToolBarMessage
(
errorMsg
);
qgcApp
()
->
showToolBarMessage
(
errorMsg
);
}
}
}
}
...
...
src/QmlControls/ParameterEditor.qml
View file @
f970a839
...
@@ -62,7 +62,7 @@ QGCView {
...
@@ -62,7 +62,7 @@ QGCView {
id
:
editorDialogComponent
id
:
editorDialogComponent
ParameterEditorDialog
{
fact
:
__editorDialogFact
}
ParameterEditorDialog
{
fact
:
__editorDialogFact
}
}
// Component - Editor Dialog
}
Component
{
Component
{
id
:
searchDialogComponent
id
:
searchDialogComponent
...
@@ -207,14 +207,17 @@ QGCView {
...
@@ -207,14 +207,17 @@ QGCView {
id
:
groupedViewComponent
id
:
groupedViewComponent
Item
{
Item
{
ScrollView
{
Flickable
{
id
:
groupScroll
id
:
groupScroll
width
:
defaultTextWidth
*
25
width
:
defaultTextWidth
*
25
height
:
parent
.
height
height
:
parent
.
height
clip
:
true
Component.onCompleted
:
flickableItem
.
flickableDirection
=
Flickable
.
VerticalFlick
contentHeight
:
groupedViewComponentColumn
.
height
contentWidth
:
groupedViewComponentColumn
.
width
boundsBehavior
:
Flickable
.
StopAtBounds
flickableDirection
:
Flickable
.
VerticalFlick
Column
{
Column
{
id
:
groupedViewComponentColumn
Repeater
{
Repeater
{
model
:
controller
.
componentIds
model
:
controller
.
componentIds
...
@@ -261,24 +264,27 @@ QGCView {
...
@@ -261,24 +264,27 @@ QGCView {
}
// Column - Component
}
// Column - Component
}
// Repeater - Components
}
// Repeater - Components
}
// Column - Component
}
// Column - Component
}
//
ScrollView
- Groups
}
//
Flickable
- Groups
ScrollView
{
Flickable
{
id
:
factScrollView
id
:
factScrollView
anchors.left
:
groupScroll
.
right
anchors.left
:
groupScroll
.
right
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
height
:
parent
.
height
height
:
parent
.
height
contentHeight
:
factRowsLoader
.
height
contentWidth
:
panel
.
width
*
2
//-- TODO: Find how to get actual resulting width. "factRowsLoader.sourceComponent.width" doesn't work.
boundsBehavior
:
Flickable
.
StopAtBounds
clip
:
true
Loader
{
Loader
{
id
:
factRowsLoader
id
:
factRowsLoader
width
:
factScrollView
.
width
sourceComponent
:
factRowsComponent
sourceComponent
:
factRowsComponent
property
int
componentId
:
controller
.
componentIds
[
0
]
property
int
componentId
:
controller
.
componentIds
[
0
]
property
string
group
:
controller
.
getGroupsForComponent
(
controller
.
componentIds
[
0
])[
0
]
property
string
group
:
controller
.
getGroupsForComponent
(
controller
.
componentIds
[
0
])[
0
]
property
var
parameterNames
:
controller
.
getParametersForGroup
(
componentId
,
group
)
property
var
parameterNames
:
controller
.
getParametersForGroup
(
componentId
,
group
)
}
}
}
//
ScrollView
- Facts
}
//
Flickable
- Facts
}
// Item
}
// Item
}
// Component - groupedViewComponent
}
// Component - groupedViewComponent
...
@@ -291,6 +297,8 @@ QGCView {
...
@@ -291,6 +297,8 @@ QGCView {
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
height
:
parent
.
height
height
:
parent
.
height
horizontalScrollBarPolicy
:
Qt
.
ScrollBarAlwaysOff
verticalScrollBarPolicy
:
Qt
.
ScrollBarAlwaysOff
Loader
{
Loader
{
id
:
factRowsLoader
id
:
factRowsLoader
...
...
src/QmlControls/QGCColoredImage.qml
View file @
f970a839
...
@@ -32,6 +32,7 @@ Item {
...
@@ -32,6 +32,7 @@ Item {
mipmap
:
true
mipmap
:
true
antialiasing
:
true
antialiasing
:
true
visible
:
false
visible
:
false
fillMode
:
Image
.
PreserveAspectFit
anchors.fill
:
parent
anchors.fill
:
parent
}
}
...
...
src/QmlControls/ScreenTools.qml
View file @
f970a839
...
@@ -19,6 +19,7 @@ Item {
...
@@ -19,6 +19,7 @@ Item {
readonly
property
real
_defaultFontHeight
:
16
readonly
property
real
_defaultFontHeight
:
16
readonly
property
real
fontHRatio
:
isTinyScreen
?
(
_textMeasure
.
contentHeight
/
_defaultFontHeight
)
*
0.75
:
(
_textMeasure
.
contentHeight
/
_defaultFontHeight
)
readonly
property
real
fontHRatio
:
isTinyScreen
?
(
_textMeasure
.
contentHeight
/
_defaultFontHeight
)
*
0.75
:
(
_textMeasure
.
contentHeight
/
_defaultFontHeight
)
readonly
property
real
realFontHeight
:
_textMeasure
.
contentHeight
readonly
property
real
realFontHeight
:
_textMeasure
.
contentHeight
readonly
property
real
realFontWidth
:
_textMeasure
.
contentWidth
// On OSX ElCapitan with Qt 5.4.0 any font pixel size above 19 shows garbage test. No idea why at this point.
// On OSX ElCapitan with Qt 5.4.0 any font pixel size above 19 shows garbage test. No idea why at this point.
// Will remove Math.min when problem is figure out.
// Will remove Math.min when problem is figure out.
...
...
src/QmlControls/SubMenuButton.qml
View file @
f970a839
...
@@ -45,13 +45,11 @@ Button {
...
@@ -45,13 +45,11 @@ Button {
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
/
3
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
/
3
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
width
:
radius
*
2
width
:
ScreenTools
.
defaultFontPixelWidth
height
:
width
height
:
width
radius
:
indicatorRadius
radius
:
width
/
2
color
:
control
.
setupComplete
?
"
#00d932
"
:
"
red
"
color
:
control
.
setupComplete
?
"
#00d932
"
:
"
red
"
visible
:
control
.
setupIndicator
visible
:
control
.
setupIndicator
readonly
property
real
indicatorRadius
:
(
ScreenTools
.
defaultFontPixelHeight
*
.
75
)
/
2
}
}
}
}
...
...
src/VehicleSetup/SetupView.qml
View file @
f970a839
...
@@ -36,6 +36,7 @@ import QGroundControl.ScreenTools 1.0
...
@@ -36,6 +36,7 @@ import QGroundControl.ScreenTools 1.0
import
QGroundControl
.
MultiVehicleManager
1.0
import
QGroundControl
.
MultiVehicleManager
1.0
Rectangle
{
Rectangle
{
//color: qgcPal.windowShadeDark
color
:
qgcPal
.
window
color
:
qgcPal
.
window
z
:
QGroundControl
.
zOrderTopMost
z
:
QGroundControl
.
zOrderTopMost
...
@@ -202,43 +203,26 @@ Rectangle {
...
@@ -202,43 +203,26 @@ Rectangle {
}
}
}
}
Rectangle
{
//-- Fill entire screen, including behind tool bar
anchors.fill
:
parent
color
:
qgcPal
.
windowShadeDark
/* I think this takes too much space and is not exactly necessary
QGCLabel {
id: title
anchors.topMargin: _margin
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
horizontalAlignment: Text.AlignHCenter
font.pixelSize: ScreenTools.largeFontPixelSize
text: "Vehicle Setup"
}
*/
Rectangle
{
Rectangle
{
//-- Limit height to available height (below tool bar)
//-- Limit height to available height (below tool bar)
anchors.topMargin
:
_margin
anchors.topMargin
:
_margin
//anchors.top: title.bottom
height
:
mainWindow
.
avaiableHeight
height
:
mainWindow
.
avaiableHeight
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
color
:
qgcPal
.
window
color
:
qgcPal
.
window
ScrollView
{
Flickable
{
id
:
buttonScroll
id
:
buttonScroll
width
:
_buttonWidth
width
:
_buttonWidth
anchors.topMargin
:
_defaultTextHeight
/
2
anchors.topMargin
:
_defaultTextHeight
/
2
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
frameVisible
:
false
clip
:
true
horizontalScrollBarPolicy
:
Qt
.
ScrollBarAlwaysOff
contentHeight
:
buttonColumn
.
height
verticalScrollBarPolicy
:
Qt
.
ScrollBarAlwaysOff
contentWidth
:
parent
.
width
boundsBehavior
:
Flickable
.
StopAtBounds
flickableDirection
:
Flickable
.
VerticalFlick
Column
{
Column
{
id
:
buttonColumn
id
:
buttonColumn
...
@@ -316,8 +300,8 @@ Rectangle {
...
@@ -316,8 +300,8 @@ Rectangle {
onClicked
:
showDebugPanel
()
onClicked
:
showDebugPanel
()
}
}
}
// Column
}
}
// ScrollView
}
Loader
{
Loader
{
id
:
panelLoader
id
:
panelLoader
...
@@ -331,5 +315,4 @@ Rectangle {
...
@@ -331,5 +315,4 @@ Rectangle {
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
}
}
}
}
}
}
}
src/VehicleSetup/VehicleSummary.qml
View file @
f970a839
...
@@ -32,15 +32,60 @@ import QGroundControl.MultiVehicleManager 1.0
...
@@ -32,15 +32,60 @@ import QGroundControl.MultiVehicleManager 1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Palette
1.0
Rectangle
{
Rectangle
{
id
:
_summaryRoot
anchors.fill
:
parent
color
:
qgcPal
.
window
color
:
qgcPal
.
window
property
real
_minSummaryW
:
ScreenTools
.
defaultFontPixelWidth
*
30
property
real
_summaryBoxWidth
:
_minSummaryW
property
real
_summaryBoxSpace
:
ScreenTools
.
defaultFontPixelWidth
function
computeSummaryBoxSize
()
{
var
sw
=
0
var
rw
=
0
var
idx
=
Math
.
floor
(
_summaryRoot
.
width
/
(
_minSummaryW
+
ScreenTools
.
defaultFontPixelWidth
))
if
(
idx
<
1
)
{
_summaryBoxWidth
=
_summaryRoot
.
width
_summaryBoxSpace
=
0
}
else
{
_summaryBoxSpace
=
0
if
(
idx
>
1
)
{
_summaryBoxSpace
=
ScreenTools
.
defaultFontPixelWidth
sw
=
_summaryBoxSpace
*
(
idx
-
1
)
}
rw
=
_summaryRoot
.
width
-
sw
_summaryBoxWidth
=
rw
/
idx
}
}
function
capitalizeWords
(
sentence
)
{
return
sentence
.
replace
(
/
(?:
^|
\s)\S
/g
,
function
(
a
)
{
return
a
.
toUpperCase
();
});
}
QGCPalette
{
QGCPalette
{
id
:
qgcPal
id
:
qgcPal
colorGroupEnabled
:
enabled
colorGroupEnabled
:
enabled
}
}
Column
{
Component.onCompleted
:
{
computeSummaryBoxSize
()
}
onWidthChanged
:
{
computeSummaryBoxSize
()
}
Flickable
{
clip
:
true
anchors.fill
:
parent
anchors.fill
:
parent
contentHeight
:
summaryColumn
.
height
contentWidth
:
_summaryRoot
.
width
flickableDirection
:
Flickable
.
VerticalFlick
boundsBehavior
:
Flickable
.
StopAtBounds
Column
{
id
:
summaryColumn
width
:
_summaryRoot
.
width
spacing
:
ScreenTools
.
defaultFontPixelHeight
spacing
:
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
QGCLabel
{
...
@@ -56,16 +101,16 @@ Rectangle {
...
@@ -56,16 +101,16 @@ Rectangle {
}
}
Flow
{
Flow
{
width
:
parent
.
width
id
:
_flowCtl
spacing
:
ScreenTools
.
defaultFontPixelWidth
width
:
_summaryRoot
.
width
spacing
:
_summaryBoxSpace
Repeater
{
Repeater
{
model
:
multiVehicleManager
.
activeVehicle
.
autopilot
.
vehicleComponents
model
:
multiVehicleManager
.
activeVehicle
.
autopilot
.
vehicleComponents
// Outer summary item rectangle
// Outer summary item rectangle
Rectangle
{
Rectangle
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
28
width
:
_summaryBoxWidth
height
:
ScreenTools
.
defaultFontPixelHeight
*
13
height
:
ScreenTools
.
defaultFontPixelHeight
*
13
color
:
qgcPal
.
window
color
:
qgcPal
.
window
...
@@ -83,7 +128,7 @@ Rectangle {
...
@@ -83,7 +128,7 @@ Rectangle {
anchors.fill
:
parent
anchors.fill
:
parent
verticalAlignment
:
TextEdit
.
AlignVCenter
verticalAlignment
:
TextEdit
.
AlignVCenter
horizontalAlignment
:
TextEdit
.
AlignHCenter
horizontalAlignment
:
TextEdit
.
AlignHCenter
text
:
modelData
.
name
.
toUpperCase
(
)
text
:
capitalizeWords
(
modelData
.
name
)
}
}
// Setup indicator
// Setup indicator
...
@@ -91,9 +136,9 @@ Rectangle {
...
@@ -91,9 +136,9 @@ Rectangle {
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
/
3
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
/
3
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
width
:
10
//radius * 2
width
:
ScreenTools
.
defaultFontPixelWidth
height
:
10
//height
height
:
width
radius
:
(
ScreenTools
.
defaultFontPixelHeight
*
.
75
)
*
2
radius
:
width
/
2
color
:
modelData
.
setupComplete
?
"
#00d932
"
:
"
red
"
color
:
modelData
.
setupComplete
?
"
#00d932
"
:
"
red
"
visible
:
modelData
.
requiresSetup
visible
:
modelData
.
requiresSetup
}
}
...
@@ -103,7 +148,6 @@ Rectangle {
...
@@ -103,7 +148,6 @@ Rectangle {
Rectangle
{
Rectangle
{
anchors.top
:
titleBar
.
bottom
anchors.top
:
titleBar
.
bottom
width
:
parent
.
width
width
:
parent
.
width
Loader
{
Loader
{
anchors.fill
:
parent
anchors.fill
:
parent
source
:
modelData
.
summaryQmlSource
source
:
modelData
.
summaryQmlSource
...
@@ -113,4 +157,5 @@ Rectangle {
...
@@ -113,4 +157,5 @@ Rectangle {
}
}
}
}
}
}
}
}
}
src/ui/MainWindow.qml
View file @
f970a839
...
@@ -98,6 +98,7 @@ Item {
...
@@ -98,6 +98,7 @@ Item {
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
mainWindow
:
mainWindow
isBackgroundDark
:
flightView
.
isBackgroundDark
isBackgroundDark
:
flightView
.
isBackgroundDark
z
:
QGroundControl
.
zOrderTopMost
z
:
QGroundControl
.
zOrderTopMost
}
}
...
@@ -118,11 +119,9 @@ Item {
...
@@ -118,11 +119,9 @@ Item {
Loader
{
Loader
{
id
:
setupViewLoader
id
:
setupViewLoader
anchors.bottom
:
parent
.
bottom
anchors.fill
:
parent
anchors.right
:
parent
.
right
anchors.left
:
parent
.
left
height
:
mainWindow
.
avaiableHeight
visible
:
false
visible
:
false
property
var
tabletPosition
:
mainWindow
.
tabletPosition
property
var
tabletPosition
:
mainWindow
.
tabletPosition
}
}
}
}
src/ui/toolbar/MainToolBar.qml
View file @
f970a839
...
@@ -45,6 +45,7 @@ Rectangle {
...
@@ -45,6 +45,7 @@ Rectangle {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
property
var
activeVehicle
:
multiVehicleManager
.
activeVehicle
property
var
activeVehicle
:
multiVehicleManager
.
activeVehicle
property
var
mainWindow
:
null
property
bool
isMessageImportant
:
activeVehicle
?
!
activeVehicle
.
messageTypeNormal
&&
!
activeVehicle
.
messageTypeNone
:
false
property
bool
isMessageImportant
:
activeVehicle
?
!
activeVehicle
.
messageTypeNormal
&&
!
activeVehicle
.
messageTypeNone
:
false
property
bool
isBackgroundDark
:
true
property
bool
isBackgroundDark
:
true
...
@@ -395,22 +396,27 @@ Rectangle {
...
@@ -395,22 +396,27 @@ Rectangle {
height
:
ScreenTools
.
defaultFontPixelHeight
*
ScreenTools
.
fontHRatio
*
6
height
:
ScreenTools
.
defaultFontPixelHeight
*
ScreenTools
.
fontHRatio
*
6
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.65
)
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.65
)
visible
:
false
visible
:
false
ScrollView
{
width
:
toolBarMessageArea
.
width
-
toolBarMessageCloseButton
.
width
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
frameVisible
:
false
horizontalScrollBarPolicy
:
Qt
.
ScrollBarAlwaysOff
verticalScrollBarPolicy
:
Qt
.
ScrollBarAlwaysOff
QGCLabel
{
QGCLabel
{
id
:
toolBarMessage
id
:
toolBarMessage
width
:
toolBarMessageArea
.
width
-
toolBarMessageCloseButton
.
width
width
:
toolBarMessageArea
.
width
-
toolBarMessageCloseButton
.
width
wrapMode
:
Text
.
WordWrap
wrapMode
:
Text
.
WordWrap
color
:
qgcPal
.
warningText
color
:
qgcPal
.
warningText
lineHeightMode
:
Text
.
ProportionalHeight
lineHeightMode
:
Text
.
ProportionalHeight
lineHeight
:
1.25
lineHeight
:
1.15
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.margins
:
tbSpacing
anchors.margins
:
tbSpacing
}
}
}
QGCButton
{
QGCButton
{
id
:
toolBarMessageCloseButton
id
:
toolBarMessageCloseButton
primary
:
true
primary
:
true
text
:
"
Close
Message
"
text
:
"
Close
"
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.margins
:
tbSpacing
anchors.margins
:
tbSpacing
...
...
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