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
4333b50b
Commit
4333b50b
authored
Apr 02, 2017
by
Don Gagne
Committed by
GitHub
Apr 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4904 from DonLakeFlyer/PlanToolbarLayout
Plan toolbar: Layout fixes to keep things from moving around
parents
246bfba0
d0cfcdf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
27 deletions
+63
-27
PlanToolBar.qml
src/PlanView/PlanToolBar.qml
+63
-27
No files found.
src/PlanView/PlanToolBar.qml
View file @
4333b50b
...
...
@@ -43,6 +43,9 @@ Rectangle {
onRawValueChanged
:
console
.
log
(
"
changed
"
,
QGroundControl
.
settingsManager
.
appSettings
.
automaticMissionUpload
.
rawValue
)
}
property
real
_largeValueWidth
:
ScreenTools
.
defaultFontPixelWidth
*
8
property
real
_smallValueWidth
:
ScreenTools
.
defaultFontPixelWidth
*
4
property
real
_labelToValueSpacing
:
ScreenTools
.
defaultFontPixelWidth
property
real
_distance
:
_statusValid
?
currentMissionItem
.
distance
:
NaN
property
real
_altDifference
:
_statusValid
?
currentMissionItem
.
altDifference
:
NaN
property
real
_gradient
:
_statusValid
&&
currentMissionItem
.
distance
>
0
?
Math
.
atan
(
currentMissionItem
.
altDifference
/
currentMissionItem
.
distance
)
:
NaN
...
...
@@ -58,9 +61,9 @@ Rectangle {
property
string
_altDifferenceText
:
isNaN
(
_altDifference
)
?
"
-.-
"
:
QGroundControl
.
metersToAppSettingsDistanceUnits
(
_altDifference
).
toFixed
(
1
)
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
property
string
_gradientText
:
isNaN
(
_gradient
)
?
"
-.-
"
:
_gradientPercent
.
toFixed
(
0
)
+
"
%
"
property
string
_azimuthText
:
isNaN
(
_azimuth
)
?
"
-.-
"
:
Math
.
round
(
_azimuth
)
property
string
_missionDistanceText
:
isNaN
(
_missionDistance
)
?
"
-.-
"
:
QGroundControl
.
metersToAppSettingsDistanceUnits
(
_missionDistance
).
toFixed
(
1
)
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
property
string
_missionTimeText
:
isNaN
(
_missionTime
)
?
"
-.-
"
:
Number
(
_missionTime
/
60
).
toFixed
(
1
)
+
"
min
"
property
string
_missionMaxTelemetryText
:
isNaN
(
_missionMaxTelemetry
)
?
"
-.-
"
:
QGroundControl
.
metersToAppSettingsDistanceUnits
(
_missionMaxTelemetry
).
toFixed
(
1
)
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
property
string
_missionDistanceText
:
isNaN
(
_missionDistance
)
?
"
-.-
"
:
QGroundControl
.
metersToAppSettingsDistanceUnits
(
_missionDistance
).
toFixed
(
0
)
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
property
string
_missionTimeText
:
isNaN
(
_missionTime
)
?
"
-.-
"
:
Number
(
_missionTime
/
60
).
toFixed
(
0
)
+
"
min
"
property
string
_missionMaxTelemetryText
:
isNaN
(
_missionMaxTelemetry
)
?
"
-.-
"
:
QGroundControl
.
metersToAppSettingsDistanceUnits
(
_missionMaxTelemetry
).
toFixed
(
0
)
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
property
string
_batteryChangePointText
:
_batteryChangePoint
<
0
?
"
N/A
"
:
_batteryChangePoint
property
string
_batteriesRequiredText
:
_batteriesRequired
<
0
?
"
N/A
"
:
_batteriesRequired
...
...
@@ -100,11 +103,10 @@ Rectangle {
}
GridLayout
{
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
columns
:
5
rowSpacing
:
0
columnSpacing
:
_margins
/
4
anchors.verticalCenter
:
parent
.
verticalCenter
columns
:
5
rowSpacing
:
0
columnSpacing
:
_labelToValueSpacing
QGCLabel
{
text
:
qsTr
(
"
Selected waypoint
"
)
...
...
@@ -113,28 +115,43 @@ Rectangle {
}
QGCLabel
{
text
:
qsTr
(
"
Distance:
"
)
}
QGCLabel
{
text
:
_distanceText
}
QGCLabel
{
text
:
_distanceText
Layout.minimumWidth
:
_largeValueWidth
horizontalAlignment
:
Text
.
AlignRight
}
Item
{
width
:
1
;
height
:
1
}
QGCLabel
{
text
:
qsTr
(
"
Gradient:
"
)
}
QGCLabel
{
text
:
_gradientText
}
QGCLabel
{
text
:
_gradientText
Layout.minimumWidth
:
_smallValueWidth
horizontalAlignment
:
Text
.
AlignRight
}
QGCLabel
{
text
:
qsTr
(
"
Alt diff:
"
)
}
QGCLabel
{
text
:
_altDifferenceText
}
QGCLabel
{
text
:
_altDifferenceText
Layout.minimumWidth
:
_largeValueWidth
horizontalAlignment
:
Text
.
AlignRight
}
Item
{
width
:
1
;
height
:
1
}
QGCLabel
{
text
:
qsTr
(
"
Azimuth:
"
)
}
QGCLabel
{
text
:
_azimuthText
}
QGCLabel
{
text
:
_azimuthText
Layout.minimumWidth
:
_smallValueWidth
horizontalAlignment
:
Text
.
AlignRight
}
}
GridLayout
{
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
columns
:
5
rowSpacing
:
0
columnSpacing
:
_margins
/
4
anchors.verticalCenter
:
parent
.
verticalCenter
columns
:
5
rowSpacing
:
0
columnSpacing
:
_labelToValueSpacing
QGCLabel
{
text
:
qsTr
(
"
Total mission
"
)
...
...
@@ -143,23 +160,34 @@ Rectangle {
}
QGCLabel
{
text
:
qsTr
(
"
Distance:
"
)
}
QGCLabel
{
text
:
_missionDistanceText
}
QGCLabel
{
text
:
_missionDistanceText
Layout.minimumWidth
:
_largeValueWidth
horizontalAlignment
:
Text
.
AlignRight
}
Item
{
width
:
1
;
height
:
1
}
QGCLabel
{
text
:
qsTr
(
"
Max telem dist:
"
)
}
QGCLabel
{
text
:
_missionMaxTelemetryText
}
QGCLabel
{
text
:
_missionMaxTelemetryText
Layout.minimumWidth
:
_largeValueWidth
horizontalAlignment
:
Text
.
AlignRight
}
QGCLabel
{
text
:
qsTr
(
"
Time:
"
)
}
QGCLabel
{
text
:
_missionTimeText
}
QGCLabel
{
text
:
_missionTimeText
Layout.minimumWidth
:
_largeValueWidth
horizontalAlignment
:
Text
.
AlignRight
}
}
GridLayout
{
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
columns
:
3
rowSpacing
:
0
columnSpacing
:
_margins
/
4
anchors.verticalCenter
:
parent
.
verticalCenter
columns
:
3
rowSpacing
:
0
columnSpacing
:
_labelToValueSpacing
QGCLabel
{
text
:
qsTr
(
"
Battery
"
)
...
...
@@ -168,12 +196,20 @@ Rectangle {
}
QGCLabel
{
text
:
qsTr
(
"
Batteries required:
"
)
}
QGCLabel
{
text
:
_batteriesRequiredText
}
QGCLabel
{
text
:
_batteriesRequiredText
horizontalAlignment
:
Text
.
AlignRight
Layout.minimumWidth
:
_smallValueWidth
}
Item
{
width
:
1
;
height
:
1
}
QGCLabel
{
text
:
qsTr
(
"
Swap waypoint:
"
)
}
QGCLabel
{
text
:
_batteryChangePointText
}
QGCLabel
{
text
:
_batteryChangePointText
horizontalAlignment
:
Text
.
AlignRight
Layout.minimumWidth
:
_smallValueWidth
}
}
}
...
...
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