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
d0652c35
Commit
d0652c35
authored
Dec 10, 2019
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
c133b717
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
2 deletions
+49
-2
AltitudeFactTextField.qml
src/FactSystem/FactControls/AltitudeFactTextField.qml
+41
-2
PlanView.SettingsGroup.json
src/Settings/PlanView.SettingsGroup.json
+6
-0
PlanViewSettings.cc
src/Settings/PlanViewSettings.cc
+1
-0
PlanViewSettings.h
src/Settings/PlanViewSettings.h
+1
-0
No files found.
src/FactSystem/FactControls/AltitudeFactTextField.qml
View file @
d0652c35
import
QtQuick
2.3
/****************************************************************************
*
* (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.3
import
QtQuick
.
Dialogs
1.2
import
QtQuick
.
Layouts
1.2
import
QGroundControl
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
FactTextField
{
unitsLabel
:
fact
?
fact
.
units
:
""
...
...
@@ -16,7 +29,8 @@ FactTextField {
readonly
property
string
_altModeAboveTerrainExtraUnits
:
qsTr
(
"
(Abv Terr)
"
)
readonly
property
string
_altModeTerrainFrameExtraUnits
:
qsTr
(
"
(TerrF)
"
)
property
string
_altitudeModeExtraUnits
:
_altModeNoneExtraUnits
property
string
_altitudeModeExtraUnits
:
_altModeNoneExtraUnits
property
Fact
_aboveTerrainWarning
:
QGroundControl
.
settingsManager
.
planViewSettings
.
aboveTerrainWarning
onAltitudeModeChanged
:
updateAltitudeModeExtraUnits
()
...
...
@@ -29,6 +43,9 @@ FactTextField {
_altitudeModeExtraUnits
=
_altModeAbsoluteExtraUnits
}
else
if
(
altitudeMode
===
QGroundControl
.
AltitudeModeAboveTerrain
)
{
_altitudeModeExtraUnits
=
_altModeAboveTerrainExtraUnits
if
(
!
_aboveTerrainWarning
.
rawValue
)
{
mainWindow
.
showComponentDialog
(
aboveTerrainWarning
,
qsTr
(
"
Warning
"
),
mainWindow
.
showDialogDefaultWidth
,
StandardButton
.
Ok
)
}
}
else
if
(
missionItem
.
altitudeMode
===
QGroundControl
.
AltitudeModeTerrainFrame
)
{
_altitudeModeExtraUnits
=
_altModeTerrainFrameExtraUnits
}
else
{
...
...
@@ -36,4 +53,26 @@ FactTextField {
_altitudeModeExtraUnits
=
""
}
}
Component
{
id
:
aboveTerrainWarning
QGCViewDialog
{
ColumnLayout
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
Layout.fillWidth
:
true
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
'Above Terrain' will set an absolute altitude for the item based on the terrain height at the location and the requested altitude above terrain. It does not send terrain heights to the vehicle.
"
)
}
FactCheckBox
{
text
:
qsTr
(
"
Don't show again
"
)
fact
:
_aboveTerrainWarning
}
}
}
}
}
src/Settings/PlanView.SettingsGroup.json
View file @
d0652c35
...
...
@@ -4,5 +4,11 @@
"shortDescription"
:
"Display the presets tab at start"
,
"type"
:
"bool"
,
"defaultValue"
:
false
},
{
"name"
:
"aboveTerrainWarning"
,
"shortDescription"
:
"Don't warn user about 'Above Terrain' usage"
,
"type"
:
"bool"
,
"defaultValue"
:
false
}
]
src/Settings/PlanViewSettings.cc
View file @
d0652c35
...
...
@@ -18,3 +18,4 @@ DECLARE_SETTINGGROUP(PlanView, "PlanView")
}
DECLARE_SETTINGSFACT
(
PlanViewSettings
,
displayPresetsTabFirst
)
DECLARE_SETTINGSFACT
(
PlanViewSettings
,
aboveTerrainWarning
)
src/Settings/PlanViewSettings.h
View file @
d0652c35
...
...
@@ -21,4 +21,5 @@ public:
// Most individual settings related to PlanView are still in AppSettings due to historical reasons.
DEFINE_SETTINGFACT
(
displayPresetsTabFirst
)
DEFINE_SETTINGFACT
(
aboveTerrainWarning
)
};
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