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
b0d48d47
Commit
b0d48d47
authored
Aug 09, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
c5511e09
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
355 additions
and
247 deletions
+355
-247
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
FlyView.qml
src/FlightDisplay/FlyView.qml
+3
-6
FlyViewWidgetLayer.qml
src/FlightDisplay/FlyViewWidgetLayer.qml
+41
-17
GuidedActionConfirm.qml
src/FlightDisplay/GuidedActionConfirm.qml
+65
-71
TelemetryValuesBar.qml
src/FlightDisplay/TelemetryValuesBar.qml
+54
-0
MapAddMission.svg
src/FlightMap/Images/MapAddMission.svg
+1
-1
MapCenter.svg
src/FlightMap/Images/MapCenter.svg
+5
-5
MapDrawShape.svg
src/FlightMap/Images/MapDrawShape.svg
+2
-2
MapSync.svg
src/FlightMap/Images/MapSync.svg
+2
-2
MapSyncChanged.svg
src/FlightMap/Images/MapSyncChanged.svg
+2
-2
CameraPageWidget.qml
src/FlightMap/Widgets/CameraPageWidget.qml
+3
-3
PlanEditToolbar.qml
src/PlanView/PlanEditToolbar.qml
+1
-1
SimpleItemEditor.qml
src/PlanView/SimpleItemEditor.qml
+1
-1
QGCPalette.cc
src/QGCPalette.cc
+6
-3
QGCPalette.h
src/QGCPalette.h
+3
-0
FactValueGrid.cc
src/QmlControls/FactValueGrid.cc
+39
-22
FactValueGrid.h
src/QmlControls/FactValueGrid.h
+16
-11
HorizontalFactValueGrid.cc
src/QmlControls/HorizontalFactValueGrid.cc
+2
-2
HorizontalFactValueGrid.h
src/QmlControls/HorizontalFactValueGrid.h
+3
-3
HorizontalFactValueGrid.qml
src/QmlControls/HorizontalFactValueGrid.qml
+38
-21
qmldir
src/QmlControls/QGroundControl/FlightDisplay/qmldir
+1
-0
ToolStrip.qml
src/QmlControls/ToolStrip.qml
+1
-1
QGCCorePlugin.cc
src/api/QGCCorePlugin.cc
+62
-40
QGCOptions.h
src/api/QGCOptions.h
+0
-2
MainRootWindow.qml
src/ui/MainRootWindow.qml
+1
-1
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+2
-30
No files found.
qgroundcontrol.qrc
View file @
b0d48d47
...
...
@@ -232,6 +232,7 @@
<file alias="QGroundControl/FlightDisplay/PreFlightSoundCheck.qml">src/FlightDisplay/PreFlightSoundCheck.qml</file>
<file alias="QGroundControl/FlightDisplay/PreFlightCheckListShowAction.qml">src/FlightDisplay/PreFlightCheckListShowAction.qml</file>
<file alias="QGroundControl/FlightDisplay/TerrainProgress.qml">src/FlightDisplay/TerrainProgress.qml</file>
<file alias="QGroundControl/FlightDisplay/TelemetryValuesBar.qml">src/FlightDisplay/TelemetryValuesBar.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>
...
...
src/FlightDisplay/FlyView.qml
View file @
b0d48d47
...
...
@@ -52,7 +52,6 @@ Item {
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
...
...
@@ -77,7 +76,6 @@ Item {
FlyViewWidgetLayer
{
id
:
widgetLayer
anchors.rightMargin
:
_toolsMargin
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
...
...
@@ -100,12 +98,11 @@ Item {
GuidedActionsController
{
id
:
guidedActionsController
missionController
:
_missionController
confirmDialog
:
_guidedConfirm
actionList
:
_guidedActionList
altitudeSlider
:
_guidedAltSlider
}
GuidedActionConfirm
{
/*
GuidedActionConfirm {
id: guidedActionConfirm
anchors.margins: _margins
anchors.bottom: parent.bottom
...
...
@@ -113,7 +110,7 @@ Item {
z: QGroundControl.zOrderTopMost
guidedController: _guidedController
altitudeSlider: _guidedAltSlider
}
}
*/
GuidedActionList
{
id
:
guidedActionList
...
...
@@ -144,7 +141,7 @@ Item {
rightPanelWidth
:
ScreenTools
.
defaultFontPixelHeight
*
9
pipMode
:
!
_mainWindowIsMap
toolInsets
:
customOverlay
.
totalToolInsets
mapName
:
"
FlightDisplayView
"
mapName
:
"
FlightDisplayView
"
}
FlyViewVideo
{
...
...
src/FlightDisplay/FlyViewWidgetLayer.qml
View file @
b0d48d47
...
...
@@ -18,6 +18,7 @@ import QtQuick.Window 2.2
import
QtQml
.
Models
2.1
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Airspace
1.0
import
QGroundControl
.
Airmap
1.0
import
QGroundControl
.
Controllers
1.0
...
...
@@ -50,18 +51,18 @@ Item {
QGCToolInsets
{
id
:
_totalToolInsets
leftEdgeCenterInset
:
toolStrip
.
leftInset
leftEdgeTopInset
:
toolStrip
.
leftInset
leftEdgeCenterInset
:
toolStrip
.
leftInset
leftEdgeBottomInset
:
parentToolInsets
.
leftEdgeBottomInset
rightEdgeCenterInset
:
instrumentPanel
.
rightInset
rightEdgeTopInset
:
instrumentPanel
.
rightInset
rightEdgeBottomInset
:
instrumentPanel
.
rightInset
topEdgeCenterInset
:
parentToolInsets
.
topEdgeCenterInset
rightEdgeTopInset
:
parentToolInsets
.
rightEdgeTopInset
rightEdgeCenterInset
:
parentToolInsets
.
rightEdgeCenterInset
rightEdgeBottomInset
:
parentToolInsets
.
rightEdgeBottomInset
topEdgeLeftInset
:
parentToolInsets
.
topEdgeLeftInset
topEdgeCenterInset
:
parentToolInsets
.
topEdgeCenterInset
topEdgeRightInset
:
parentToolInsets
.
topEdgeRightInset
bottomEdgeCenterInset
:
mapScale
.
centerInset
bottomEdgeLeftInset
:
parentToolInsets
.
bottomEdgeLeftInset
bottomEdgeRightInset
:
parentToolInsets
.
bottomEdgeRightInset
bottomEdgeCenterInset
:
mapScale
.
centerInset
bottomEdgeRightInset
:
telemetryPanel
.
bottomInset
}
FlyViewMissionCompleteDialog
{
...
...
@@ -84,6 +85,30 @@ Item {
property
real
rightInset
:
visible
?
parent
.
width
-
x
:
0
}
TelemetryValuesBar
{
id
:
telemetryPanel
x
:
recalcXPosition
()
anchors.margins
:
_toolsMargin
anchors.bottom
:
parent
.
bottom
function
recalcXPosition
()
{
// First try centered
var
halfRootWidth
=
_root
.
width
/
2
var
halfPanelWidth
=
telemetryPanel
.
width
/
2
var
leftX
=
(
halfRootWidth
-
halfPanelWidth
)
-
_toolsMargin
var
rightX
=
(
halfRootWidth
+
halfPanelWidth
)
+
_toolsMargin
if
(
leftX
>=
parentToolInsets
.
leftEdgeBottomInset
||
rightX
<=
parentToolInsets
.
rightEdgeBottomInset
)
{
// It will fit in the horizontalCenter
return
halfRootWidth
-
halfPanelWidth
}
else
{
// Anchor to left edge
return
parentToolInsets
.
leftEdgeBottomInset
+
_toolsMargin
}
}
property
real
bottomInset
:
height
}
//-- Virtual Joystick
Loader
{
id
:
virtualJoystickMultiTouch
...
...
@@ -105,11 +130,11 @@ Item {
FlyViewToolStrip
{
id
:
toolStrip
anchors.leftMargin
:
_toolsMargin
+
parentToolInsets
.
leftEdgeCenterInset
anchors.topMargin
:
_toolsMargin
+
parentToolInsets
.
leftEdgeTop
Inset
anchors.topMargin
:
_toolsMargin
+
parentToolInsets
.
topEdgeLeft
Inset
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
z
:
QGroundControl
.
zOrderWidgets
maxHeight
:
parent
.
height
-
y
-
parentToolInsets
.
leftEdgeBottom
Inset
-
_toolsMargin
maxHeight
:
parent
.
height
-
y
-
parentToolInsets
.
bottomEdgeLeft
Inset
-
_toolsMargin
visible
:
!
QGroundControl
.
videoManager
.
fullScreen
onDisplayPreFlightChecklist
:
preFlightChecklistPopup
.
open
()
...
...
@@ -131,14 +156,13 @@ Item {
}
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
id
:
mapScale
anchors.margins
:
_toolsMargin
anchors.left
:
toolStrip
.
right
anchors.top
:
parent
.
top
mapControl
:
_mapControl
buttonsOnLeft
:
false
visible
:
!
ScreenTools
.
isTinyScreen
&&
QGroundControl
.
corePlugin
.
options
.
flyView
.
showMapScale
&&
mapControl
.
pipState
.
state
!==
mapControl
.
pipState
.
pipState
property
real
centerInset
:
visible
?
parent
.
height
-
y
:
0
}
...
...
src/FlightDisplay/GuidedActionConfirm.qml
View file @
b0d48d47
...
...
@@ -7,28 +7,26 @@
*
****************************************************************************/
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
2.12
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Layouts
1.12
import
QGroundControl
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
/// Guided actions confirmation dialog
Rectangle
{
id
:
_root
width
:
confirmColumn
.
width
+
(
_margins
*
4
)
height
:
confirmColumn
.
height
+
(
_margins
*
4
)
radius
:
ScreenTools
.
defaultFontPixelHeight
/
2
color
:
qgcPal
.
window
border.color
:
_emergencyAction
?
"
red
"
:
qgcPal
.
windowShade
border.width
:
_emergencyAction
?
4
:
1
visible
:
false
id
:
_root
Layout.minimumWidth
:
mainLayout
.
width
+
(
_margins
*
2
)
Layout.preferredHeight
:
mainLayout
.
height
+
(
_margins
*
2
)
radius
:
ScreenTools
.
defaultFontPixelWidth
/
2
color
:
qgcPal
.
windowShadeLight
visible
:
false
property
var
guidedController
property
var
altitudeSlider
property
alias
title
:
titleText
.
text
property
string
title
// Currently unused
property
alias
message
:
messageText
.
text
property
int
action
property
var
actionData
...
...
@@ -37,9 +35,11 @@ Rectangle {
property
alias
optionText
:
optionCheckBox
.
text
property
alias
optionChecked
:
optionCheckBox
.
checked
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
bool
_emergencyAction
:
action
===
guidedController
.
actionEmergencyStop
Component.onCompleted
:
guidedController
.
confirmDialog
=
this
onHideTriggerChanged
:
{
if
(
hideTrigger
)
{
confirmCancelled
()
...
...
@@ -50,7 +50,7 @@ Rectangle {
if
(
immediate
)
{
visible
=
true
}
else
{
// We delay showing the confirmation for a small amount in order
to
any other state
// We delay showing the confirmation for a small amount in order
for
any other state
// changes to propogate through the system. This way only the final state shows up.
visibleTimer
.
restart
()
}
...
...
@@ -76,76 +76,70 @@ Rectangle {
QGCPalette
{
id
:
qgcPal
}
DeadMouseArea
{
anchors.fill
:
parent
}
Column
{
id
:
confirmColumn
anchors.margins
:
_margins
anchors.centerIn
:
parent
spacing
:
_margins
QGCLabel
{
id
:
titleText
anchors.left
:
slider
.
left
anchors.right
:
slider
.
right
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
largeFontPointSize
}
ColumnLayout
{
id
:
mainLayout
anchors.horizontalCenter
:
parent
.
horizontalCenter
spacing
:
_margins
QGCLabel
{
id
:
messageText
anchors.left
:
slider
.
left
anchors.right
:
slider
.
right
Layout.fillWidth
:
true
horizontalAlignment
:
Text
.
AlignHCenter
wrapMode
:
Text
.
WordWrap
}
QGCCheckBox
{
id
:
optionCheckBox
anchors.horizontalCenter
:
parent
.
horizontal
Center
text
:
""
visible
:
text
!==
""
id
:
optionCheckBox
Layout.alignment
:
Qt
.
AlignH
Center
text
:
""
visible
:
text
!==
""
}
// Action confirmation control
SliderSwitch
{
id
:
slider
confirmText
:
qsTr
(
"
Slide to confirm
"
)
width
:
Math
.
max
(
implicitWidth
,
ScreenTools
.
defaultFontPixelWidth
*
30
)
onAccept
:
{
_root
.
visible
=
false
var
altitudeChange
=
0
if
(
altitudeSlider
.
visible
)
{
altitudeChange
=
altitudeSlider
.
getAltitudeChangeValue
()
altitudeSlider
.
visible
=
false
}
hideTrigger
=
false
guidedController
.
executeAction
(
_root
.
action
,
_root
.
actionData
,
altitudeChange
,
_root
.
optionChecked
)
if
(
mapIndicator
)
{
mapIndicator
.
actionConfirmed
()
mapIndicator
=
undefined
RowLayout
{
Layout.alignment
:
Qt
.
AlignHCenter
spacing
:
ScreenTools
.
defaultFontPixelWidth
SliderSwitch
{
id
:
slider
confirmText
:
qsTr
(
"
Slide to confirm
"
)
Layout.minimumWidth
:
Math
.
max
(
implicitWidth
,
ScreenTools
.
defaultFontPixelWidth
*
30
)
onAccept
:
{
_root
.
visible
=
false
var
altitudeChange
=
0
if
(
altitudeSlider
.
visible
)
{
altitudeChange
=
altitudeSlider
.
getAltitudeChangeValue
()
altitudeSlider
.
visible
=
false
}
hideTrigger
=
false
guidedController
.
executeAction
(
_root
.
action
,
_root
.
actionData
,
altitudeChange
,
_root
.
optionChecked
)
if
(
mapIndicator
)
{
mapIndicator
.
actionConfirmed
()
mapIndicator
=
undefined
}
}
}
}
}
QGCColoredImage
{
anchors.margins
:
_margins
anchors.top
:
parent
.
top
anchors.right
:
parent
.
right
width
:
ScreenTools
.
defaultFontPixelHeight
height
:
width
sourceSize.height
:
width
source
:
"
/res/XDelete.svg
"
fillMode
:
Image
.
PreserveAspectFit
color
:
qgcPal
.
text
QGCMouseArea
{
fillItem
:
parent
onClicked
:
confirmCancelled
()
Rectangle
{
height
:
slider
.
height
*
0.75
width
:
height
radius
:
height
/
2
color
:
qgcPal
.
primaryButton
QGCColoredImage
{
anchors.margins
:
parent
.
height
/
4
anchors.fill
:
parent
source
:
"
/res/XDelete.svg
"
fillMode
:
Image
.
PreserveAspectFit
color
:
qgcPal
.
text
}
QGCMouseArea
{
fillItem
:
parent
onClicked
:
confirmCancelled
()
}
}
}
}
}
src/FlightDisplay/TelemetryValuesBar.qml
0 → 100644
View file @
b0d48d47
/****************************************************************************
*
* (c) 2009-2016 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
.
Layouts
1.12
import
QGroundControl
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
Rectangle
{
id
:
telemetryPanel
height
:
telemetryLayout
.
height
+
(
_toolsMargin
*
2
)
width
:
telemetryLayout
.
width
+
(
_toolsMargin
*
2
)
color
:
Qt
.
hsla
(
_baseBGColor
.
hslHue
,
_baseBGColor
.
hslSaturation
,
_baseBGColor
.
hslLightness
,
0.5
)
radius
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
color
_baseBGColor
:
qgcPal
.
window
DeadMouseArea
{
anchors.fill
:
parent
}
ColumnLayout
{
id
:
telemetryLayout
anchors.margins
:
_toolsMargin
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
HorizontalFactValueGrid
{
id
:
valueArea
userSettingsGroup
:
telemetryBarUserSettingsGroup
defaultSettingsGroup
:
telemetryBarDefaultSettingsGroup
QGCMouseArea
{
anchors.fill
:
parent
visible
:
!
parent
.
settingsUnlocked
onClicked
:
parent
.
settingsUnlocked
=
true
}
}
GuidedActionConfirm
{
Layout.fillWidth
:
true
guidedController
:
_guidedController
altitudeSlider
:
_guidedAltSlider
}
}
}
src/FlightMap/Images/MapAddMission.svg
View file @
b0d48d47
...
...
@@ -6,5 +6,5 @@
<path
fill=
"#FFFFFF"
d=
"M-55.213,94.612V84.146h-10.386v-4.373h10.385V69.384h4.425v10.389h10.387v4.373h-10.386v10.466
C-50.788,94.612-55.213,94.612-55.213,94.612z"
/>
</g>
<circle
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
2
"
stroke-miterlimit=
"10"
cx=
"-53"
cy=
"82"
r=
"22.38"
/>
<circle
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
3
"
stroke-miterlimit=
"10"
cx=
"-53"
cy=
"82"
r=
"22.38"
/>
</svg>
src/FlightMap/Images/MapCenter.svg
View file @
b0d48d47
...
...
@@ -3,10 +3,10 @@
<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=
"-89 46 72 72"
enable-background=
"new -89 46 72 72"
xml:space=
"preserve"
>
<g>
<circle
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
2
"
stroke-miterlimit=
"10"
cx=
"-53"
cy=
"82"
r=
"22.38"
/>
<line
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
2
"
stroke-miterlimit=
"10"
x1=
"-75.464"
y1=
"81.975"
x2=
"-64.423"
y2=
"82.025"
/>
<line
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
2
"
stroke-miterlimit=
"10"
x1=
"-53.025"
y1=
"104.464"
x2=
"-52.975"
y2=
"93.423"
/>
<line
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
2
"
stroke-miterlimit=
"10"
x1=
"-30.536"
y1=
"82.025"
x2=
"-41.577"
y2=
"81.975"
/>
<line
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
2
"
stroke-miterlimit=
"10"
x1=
"-52.975"
y1=
"59.536"
x2=
"-53.025"
y2=
"70.577"
/>
<circle
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
3
"
stroke-miterlimit=
"10"
cx=
"-53"
cy=
"82"
r=
"22.38"
/>
<line
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
3
"
stroke-miterlimit=
"10"
x1=
"-75.464"
y1=
"81.975"
x2=
"-64.423"
y2=
"82.025"
/>
<line
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
3
"
stroke-miterlimit=
"10"
x1=
"-53.025"
y1=
"104.464"
x2=
"-52.975"
y2=
"93.423"
/>
<line
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
3
"
stroke-miterlimit=
"10"
x1=
"-30.536"
y1=
"82.025"
x2=
"-41.577"
y2=
"81.975"
/>
<line
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
3
"
stroke-miterlimit=
"10"
x1=
"-52.975"
y1=
"59.536"
x2=
"-53.025"
y2=
"70.577"
/>
</g>
</svg>
src/FlightMap/Images/MapDrawShape.svg
View file @
b0d48d47
...
...
@@ -3,7 +3,7 @@
<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=
"-89 46 72 72"
enable-background=
"new -89 46 72 72"
xml:space=
"preserve"
>
<g
transform=
"matrix(0.96508576,0,0,0.94661676,-1.3508671,3.6129809)"
>
<path
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
1.2
"
stroke-miterlimit=
"4"
d=
"m -69.288973,77.48289 22.722433,-9.307985 2.098859,4.288973 -23.726235,9.39924 1.186311,4.471483 23.908746,-9.855514 L -41,80.768061 -66.186312,91.079848 -65,95.551331 l 25.460076,-10.403042 -2.372624,7.391635 -13.140684,5.110266"
/>
<path
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
3
"
stroke-miterlimit=
"4"
d=
"m -69.288973,77.48289 22.722433,-9.307985 2.098859,4.288973 -23.726235,9.39924 1.186311,4.471483 23.908746,-9.855514 L -41,80.768061 -66.186312,91.079848 -65,95.551331 l 25.460076,-10.403042 -2.372624,7.391635 -13.140684,5.110266"
/>
</g>
<path
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
2
"
stroke-miterlimit=
"10"
d=
"m -44.193916,62.152091 10.76806,20.623574 -9.21673,19.346005 -24.638783,-3.011404 -6.205323,-25.186312 z"
/>
<path
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
3
"
stroke-miterlimit=
"10"
d=
"m -44.193916,62.152091 10.76806,20.623574 -9.21673,19.346005 -24.638783,-3.011404 -6.205323,-25.186312 z"
/>
</svg>
src/FlightMap/Images/MapSync.svg
View file @
b0d48d47
...
...
@@ -2,12 +2,12 @@
<!-- 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=
"-89 46 72 72"
enable-background=
"new -89 46 72 72"
xml:space=
"preserve"
>
<path
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
2
"
stroke-miterlimit=
"10"
d=
"M-56.963,64.442
<path
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
3
"
stroke-miterlimit=
"10"
d=
"M-56.963,64.442
c-4.199,0.947-8.074,3.392-10.749,7.186c-5.728,8.125-3.785,19.355,4.339,25.083c0.007,0.005,0.014,0.009,0.022,0.014"
/>
<g>
<polygon
fill=
"#FFFFFF"
points=
"-59.303,88.472 -69.431,103.621 -56.794,101.11 "
/>
</g>
<path
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
2
"
stroke-miterlimit=
"10"
d=
"M-49.038,99.558
<path
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"
3
"
stroke-miterlimit=
"10"
d=
"M-49.038,99.558
c4.199-0.947,8.074-3.392,10.749-7.186c5.728-8.125,3.785-19.355-4.339-25.083c-0.007-0.005-0.014-0.009-0.022-0.014"
/>
<g>
<polygon
fill=
"#FFFFFF"
points=
"-46.698,75.528 -36.57,60.379 -49.207,62.89 "
/>
...
...
src/FlightMap/Images/MapSyncChanged.svg
View file @
b0d48d47
...
...
@@ -2,12 +2,12 @@
<!-- 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=
"-89 46 72 72"
enable-background=
"new -89 46 72 72"
xml:space=
"preserve"
>
<path
fill=
"none"
stroke=
"#FFFF00"
stroke-width=
"
2
"
stroke-miterlimit=
"10"
d=
"M-56.963,64.442
<path
fill=
"none"
stroke=
"#FFFF00"
stroke-width=
"
3
"
stroke-miterlimit=
"10"
d=
"M-56.963,64.442
c-4.199,0.947-8.074,3.392-10.749,7.186c-5.728,8.125-3.785,19.355,4.339,25.083c0.007,0.005,0.014,0.009,0.022,0.014"
/>
<g>
<polygon
fill=
"#FFFF00"
points=
"-59.303,88.472 -69.431,103.621 -56.794,101.11 "
/>
</g>
<path
fill=
"none"
stroke=
"#FFFF00"
stroke-width=
"
2
"
stroke-miterlimit=
"10"
d=
"M-49.038,99.558
<path
fill=
"none"
stroke=
"#FFFF00"
stroke-width=
"
3
"
stroke-miterlimit=
"10"
d=
"M-49.038,99.558
c4.199-0.947,8.074-3.392,10.749-7.186c5.728-8.125,3.785-19.355-4.339-25.083c-0.007-0.005-0.014-0.009-0.022-0.014"
/>
<g>
<polygon
fill=
"#FFFF00"
points=
"-46.698,75.528 -36.57,60.379 -49.207,62.89 "
/>
...
...
src/FlightMap/Widgets/CameraPageWidget.qml
View file @
b0d48d47
...
...
@@ -91,7 +91,7 @@ Column {
id
:
camMode
width
:
_hasModes
?
ScreenTools
.
defaultFontPixelWidth
*
8
:
0
height
:
_hasModes
?
ScreenTools
.
defaultFontPixelWidth
*
4
:
0
color
:
qgcPal
.
button
color
:
qgcPal
.
windowShadeLight
radius
:
height
*
0.5
visible
:
_hasModes
anchors.horizontalCenter
:
parent
.
horizontalCenter
...
...
@@ -99,7 +99,7 @@ Column {
Rectangle
{
width
:
parent
.
height
height
:
parent
.
height
color
:
_cameraVideoMode
?
qgcPal
.
window
:
qgcPal
.
button
color
:
_cameraVideoMode
?
qgcPal
.
window
:
qgcPal
.
windowShadeLight
radius
:
height
*
0.5
anchors.left
:
parent
.
left
border.color
:
qgcPal
.
text
...
...
@@ -126,7 +126,7 @@ Column {
Rectangle
{
width
:
parent
.
height
height
:
parent
.
height
color
:
_cameraPhotoMode
?
qgcPal
.
window
:
qgcPal
.
button
color
:
_cameraPhotoMode
?
qgcPal
.
window
:
qgcPal
.
windowShadeLight
radius
:
height
*
0.5
anchors.right
:
parent
.
right
border.color
:
qgcPal
.
text
...
...
src/PlanView/PlanEditToolbar.qml
View file @
b0d48d47
...
...
@@ -43,7 +43,7 @@ Item {
Rectangle
{
anchors.fill
:
parent
radius
:
_radius
color
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
?
QGroundControl
.
corePlugin
.
options
.
toolbarBackgroundLight
:
QGroundControl
.
corePlugin
.
options
.
toolbarBackgroundDark
color
:
QGroundControl
.
globalPalette
.
toolbarBackground
}
QGCFlickable
{
...
...
src/PlanView/SimpleItemEditor.qml
View file @
b0d48d47
...
...
@@ -130,7 +130,7 @@ Rectangle {
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
altColumn
.
y
+
altColumn
.
height
+
_margin
color
:
_globalAltModeIsMixed
?
qgcPal
.
windowShade
:
qgcPal
.
window
color
:
_globalAltModeIsMixed
?
qgcPal
.
windowShade
Light
:
qgcPal
.
windowShadeDark
visible
:
_specifiesAltitude
ColumnLayout
{
...
...
src/QGCPalette.cc
View file @
b0d48d47
...
...
@@ -51,6 +51,7 @@ void QGCPalette::_buildMap()
// Light Dark
// Disabled Enabled Disabled Enabled
DECLARE_QGC_COLOR
(
window
,
"#ffffff"
,
"#ffffff"
,
"#222222"
,
"#222222"
)
DECLARE_QGC_COLOR
(
windowShadeLight
,
"#909090"
,
"#828282"
,
"#707070"
,
"#626262"
)
DECLARE_QGC_COLOR
(
windowShade
,
"#d9d9d9"
,
"#d9d9d9"
,
"#333333"
,
"#333333"
)
DECLARE_QGC_COLOR
(
windowShadeDark
,
"#bdbdbd"
,
"#bdbdbd"
,
"#282828"
,
"#282828"
)
DECLARE_QGC_COLOR
(
text
,
"#9d9d9d"
,
"#000000"
,
"#707070"
,
"#ffffff"
)
...
...
@@ -80,11 +81,13 @@ void QGCPalette::_buildMap()
DECLARE_QGC_COLOR
(
statusFailedText
,
"#9d9d9d"
,
"#000000"
,
"#707070"
,
"#ffffff"
)
DECLARE_QGC_COLOR
(
statusPassedText
,
"#9d9d9d"
,
"#000000"
,
"#707070"
,
"#ffffff"
)
DECLARE_QGC_COLOR
(
statusPendingText
,
"#9d9d9d"
,
"#000000"
,
"#707070"
,
"#ffffff"
)
DECLARE_QGC_COLOR
(
toolbarBackground
,
"#ffffff"
,
"#ffffff"
,
"#222222"
,
"#222222"
)
// Colors not affecting by theming
// Disabled Enabled
DECLARE_QGC_NONTHEMED_COLOR
(
brandingPurple
,
"#4A2C6D"
,
"#4A2C6D"
)
DECLARE_QGC_NONTHEMED_COLOR
(
brandingBlue
,
"#48D6FF"
,
"#6045c5"
)
// Disabled Enabled
DECLARE_QGC_NONTHEMED_COLOR
(
brandingPurple
,
"#4A2C6D"
,
"#4A2C6D"
)
DECLARE_QGC_NONTHEMED_COLOR
(
brandingBlue
,
"#48D6FF"
,
"#6045c5"
)
DECLARE_QGC_NONTHEMED_COLOR
(
toolStripFGColor
,
"#707070"
,
"#ffffff"
)
// Colors not affecting by theming or enable/disable
DECLARE_QGC_SINGLE_COLOR
(
mapWidgetBorderLight
,
"#ffffff"
)
...
...
src/QGCPalette.h
View file @
b0d48d47
...
...
@@ -113,6 +113,7 @@ public:
Q_PROPERTY
(
QStringList
colors
READ
colors
CONSTANT
)
DEFINE_QGC_COLOR
(
window
,
setWindow
)
DEFINE_QGC_COLOR
(
windowShadeLight
,
setWindowShadeLight
)
DEFINE_QGC_COLOR
(
windowShade
,
setWindowShade
)
DEFINE_QGC_COLOR
(
windowShadeDark
,
setWindowShadeDark
)
DEFINE_QGC_COLOR
(
text
,
setText
)
...
...
@@ -149,6 +150,8 @@ public:
DEFINE_QGC_COLOR
(
statusPendingText
,
setstatusPendingText
)
DEFINE_QGC_COLOR
(
surveyPolygonInterior
,
setSurveyPolygonInterior
)
DEFINE_QGC_COLOR
(
surveyPolygonTerrainCollision
,
setSurveyPolygonTerrainCollision
)
DEFINE_QGC_COLOR
(
toolbarBackground
,
setToolbarBackground
)
DEFINE_QGC_COLOR
(
toolStripFGColor
,
setToolStripFGColor
)
QGCPalette
(
QObject
*
parent
=
nullptr
);
~
QGCPalette
();
...
...
src/QmlControls/FactValueGrid.cc
View file @
b0d48d47
...
...
@@ -51,7 +51,7 @@ FactValueGrid::FactValueGrid(QQuickItem* parent)
_iconNames
=
iconDir
.
entryList
();
}
_
connectSignals
();
_
init
();
}
FactValueGrid
::
FactValueGrid
(
const
QString
&
defaultSettingsGroup
)
...
...
@@ -59,12 +59,28 @@ FactValueGrid::FactValueGrid(const QString& defaultSettingsGroup)
,
_defaultSettingsGroup
(
defaultSettingsGroup
)
,
_rows
(
new
QmlObjectListModel
(
this
))
{
_
connectSignals
();
_
init
();
}
void
FactValueGrid
::
_
connectSignals
(
void
)
void
FactValueGrid
::
_
init
(
void
)
{
connect
(
this
,
&
FactValueGrid
::
fontSizeChanged
,
this
,
&
FactValueGrid
::
_saveSettings
);
Vehicle
*
offlineVehicle
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
offlineEditingVehicle
();
connect
(
offlineVehicle
,
&
Vehicle
::
vehicleTypeChanged
,
this
,
&
FactValueGrid
::
_offlineVehicleTypeChanged
);
connect
(
this
,
&
FactValueGrid
::
fontSizeChanged
,
this
,
&
FactValueGrid
::
_saveSettings
);
_vehicleClass
=
QGCMAVLink
::
vehicleClass
(
offlineVehicle
->
vehicleType
());
}
void
FactValueGrid
::
_offlineVehicleTypeChanged
(
void
)
{
Vehicle
*
offlineVehicle
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
offlineEditingVehicle
();
QGCMAVLink
::
VehicleClass_t
newVehicleClass
=
QGCMAVLink
::
vehicleClass
(
offlineVehicle
->
vehicleType
());
if
(
newVehicleClass
!=
_vehicleClass
)
{
_vehicleClass
=
newVehicleClass
;
_loadSettings
();
}
}
void
FactValueGrid
::
componentComplete
(
void
)
...
...
@@ -243,14 +259,15 @@ void FactValueGrid::_saveSettings(void)
return
;
}
QSettings
settings
;
QSettings
settings
;
QString
groupNameFormat
(
"%1-%2"
);
if
(
_userSettingsGroup
.
isEmpty
())
{
// This means we are setting up default settings
settings
.
beginGroup
(
_defaultSettingsGroup
);
settings
.
beginGroup
(
groupNameFormat
.
arg
(
_defaultSettingsGroup
).
arg
(
_vehicleClass
)
);
}
else
{
// This means we are saving user modifications
settings
.
remove
(
_defaultSettingsGroup
);
settings
.
beginGroup
(
_userSettingsGroup
);
settings
.
remove
(
groupNameFormat
.
arg
(
_defaultSettingsGroup
).
arg
(
_vehicleClass
)
);
settings
.
beginGroup
(
groupNameFormat
.
arg
(
_userSettingsGroup
).
arg
(
_vehicleClass
)
);
}
settings
.
remove
(
""
);
// Remove any previous settings
...
...
@@ -280,21 +297,25 @@ void FactValueGrid::_saveSettings(void)
void
FactValueGrid
::
_loadSettings
(
void
)
{
_preventSaveSettings
=
true
;
_rows
->
deleteLater
();
_rows
=
new
QmlObjectListModel
(
this
);
emit
rowsChanged
(
_rows
);
QSettings
settings
;
if
(
!
settings
.
childGroups
().
contains
(
_userSettingsGroup
))
{
_rows
=
new
QmlObjectListModel
(
this
);
_columnCount
=
0
;
QSettings
settings
;
QString
groupNameFormat
(
"%1-%2"
);
if
(
!
settings
.
childGroups
().
contains
(
groupNameFormat
.
arg
(
_userSettingsGroup
).
arg
(
_vehicleClass
)))
{
qgcApp
()
->
toolbox
()
->
corePlugin
()
->
factValueGridCreateDefaultSettings
(
_defaultSettingsGroup
);
}
_preventSaveSettings
=
true
;
if
(
settings
.
childGroups
().
contains
(
_defaultSettingsGroup
))
{
settings
.
beginGroup
(
_defaultSettingsGroup
);
if
(
settings
.
childGroups
().
contains
(
groupNameFormat
.
arg
(
_defaultSettingsGroup
).
arg
(
_vehicleClass
)
))
{
settings
.
beginGroup
(
groupNameFormat
.
arg
(
_defaultSettingsGroup
).
arg
(
_vehicleClass
)
);
}
else
{
settings
.
beginGroup
(
_userSettingsGroup
);
settings
.
beginGroup
(
groupNameFormat
.
arg
(
_userSettingsGroup
).
arg
(
_vehicleClass
)
);
}
int
version
=
settings
.
value
(
_versionKey
,
0
).
toInt
();
...
...
@@ -333,11 +354,7 @@ void FactValueGrid::_loadSettings(void)
}
settings
.
endArray
();
_preventSaveSettings
=
false
;
emit
rowsChanged
(
_rows
)
;
// Use defaults if nothing there
if
(
_rows
->
count
()
==
0
)
{
_rows
->
deleteLater
();
emit
rowsChanged
(
_rows
);
}
_preventSaveSettings
=
false
;
}
src/QmlControls/FactValueGrid.h
View file @
b0d48d47
...
...
@@ -65,8 +65,10 @@ public:
Q_INVOKABLE
void
appendColumn
(
void
);
Q_INVOKABLE
void
deleteLastColumn
(
void
);
FontSize
fontSize
(
void
)
const
{
return
_fontSize
;
}
QStringList
iconNames
(
void
)
const
{
return
_iconNames
;
}
QmlObjectListModel
*
rows
(
void
)
const
{
return
_rows
;
}
FontSize
fontSize
(
void
)
const
{
return
_fontSize
;
}
QStringList
iconNames
(
void
)
const
{
return
_iconNames
;
}
QGCMAVLink
::
VehicleClass_t
vehicleClass
(
void
)
const
{
return
_vehicleClass
;
}
void
setFontSize
(
FontSize
fontSize
);
...
...
@@ -81,22 +83,25 @@ signals:
void
columnCountChanged
(
int
columnCount
);
protected:
Q_DISABLE_COPY
(
FactValueGrid
)
QString
_defaultSettingsGroup
;
// Settings group to read from if the user has not modified from the default settings
QString
_userSettingsGroup
;
// Settings group to read from for user modified settings
Orientation
_orientation
=
VerticalOrientation
;
FontSize
_fontSize
=
DefaultFontSize
;
bool
_preventSaveSettings
=
false
;
QmlObjectListModel
*
_rows
=
nullptr
;
int
_columnCount
=
0
;
QGCMAVLink
::
VehicleClass_t
_vehicleClass
=
QGCMAVLink
::
VehicleClassGeneric
;
QString
_defaultSettingsGroup
;
// Settings group to read from if the user has not modified from the default settings
QString
_userSettingsGroup
;
// Settings group to read from for user modified settings
Orientation
_orientation
=
VerticalOrientation
;
FontSize
_fontSize
=
DefaultFontSize
;
bool
_preventSaveSettings
=
false
;
QmlObjectListModel
*
_rows
=
nullptr
;
int
_columnCount
=
0
;
private
slots
:
void
_offlineVehicleTypeChanged
(
void
);
private:
InstrumentValueData
*
_createNewInstrumentValueWorker
(
QObject
*
parent
);
void
_saveSettings
(
void
);
void
_loadSettings
(
void
);
void
_
connectSignals
(
void
);