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
49e39513
Commit
49e39513
authored
May 10, 2017
by
Jacob Walser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle null facts in Values Widget
parent
513d1583
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
51 deletions
+63
-51
ValuesWidget.qml
src/FlightMap/Widgets/ValuesWidget.qml
+63
-51
No files found.
src/FlightMap/Widgets/ValuesWidget.qml
View file @
49e39513
...
...
@@ -65,33 +65,39 @@ QGCFlickable {
Repeater
{
model
:
_activeVehicle
?
controller
.
largeValues
:
0
Column
{
width
:
_largeColumn
.
width
Loader
{
sourceComponent
:
fact
?
largeValue
:
undefined
property
Fact
fact
:
_activeVehicle
.
getFact
(
modelData
.
replace
(
"
Vehicle.
"
,
""
))
property
bool
largeValue
:
_root
.
listContains
(
controller
.
altitudeProperties
,
fact
.
name
)
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
color
:
textColor
fontSizeMode
:
Text
.
HorizontalFit
text
:
fact
.
shortDescription
+
(
fact
.
units
?
"
(
"
+
fact
.
units
+
"
)
"
:
""
)
}
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
mediumFontPointSize
*
(
largeValue
?
1.3
:
1.0
)
font.family
:
largeValue
?
ScreenTools
.
demiboldFontFamily
:
ScreenTools
.
normalFontFamily
fontSizeMode
:
Text
.
HorizontalFit
color
:
textColor
text
:
fact
.
valueString
}
}
}
// Repeater - Large
}
// Column - Large
Component
{
id
:
largeValue
Column
{
width
:
_largeColumn
.
width
property
bool
largeValue
:
_root
.
listContains
(
controller
.
altitudeProperties
,
fact
.
name
)
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
color
:
textColor
fontSizeMode
:
Text
.
HorizontalFit
text
:
fact
.
shortDescription
+
(
fact
.
units
?
"
(
"
+
fact
.
units
+
"
)
"
:
""
)
}
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
mediumFontPointSize
*
(
largeValue
?
1.3
:
1.0
)
font.family
:
largeValue
?
ScreenTools
.
demiboldFontFamily
:
ScreenTools
.
normalFontFamily
fontSizeMode
:
Text
.
HorizontalFit
color
:
textColor
text
:
fact
.
valueString
}
}
}
Flow
{
id
:
_smallFlow
width
:
parent
.
width
...
...
@@ -102,40 +108,46 @@ QGCFlickable {
Repeater
{
model
:
_activeVehicle
?
controller
.
smallValues
:
0
Column
{
width
:
(
_root
.
width
/
2
)
-
(
_margins
/
2
)
-
0.1
clip
:
true
Loader
{
sourceComponent
:
fact
?
smallValue
:
undefined
property
Fact
fact
:
_activeVehicle
.
getFact
(
modelData
.
replace
(
"
Vehicle.
"
,
""
))
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
smallFontPointSize
*
0.75
:
ScreenTools
.
smallFontPointSize
fontSizeMode
:
Text
.
HorizontalFit
color
:
textColor
text
:
fact
.
shortDescription
}
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
color
:
textColor
fontSizeMode
:
Text
.
HorizontalFit
text
:
fact
.
enumOrValueString
}
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
smallFontPointSize
*
0.75
:
ScreenTools
.
smallFontPointSize
fontSizeMode
:
Text
.
HorizontalFit
color
:
textColor
text
:
fact
.
units
}
}
}
// Repeater - Small
}
// Flow
Component
{
id
:
smallValue
Column
{
width
:
(
_root
.
width
/
2
)
-
(
_margins
/
2
)
-
0.1
clip
:
true
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
smallFontPointSize
*
0.75
:
ScreenTools
.
smallFontPointSize
fontSizeMode
:
Text
.
HorizontalFit
color
:
textColor
text
:
fact
.
shortDescription
}
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
color
:
textColor
fontSizeMode
:
Text
.
HorizontalFit
text
:
fact
.
enumOrValueString
}
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
smallFontPointSize
*
0.75
:
ScreenTools
.
smallFontPointSize
fontSizeMode
:
Text
.
HorizontalFit
color
:
textColor
text
:
fact
.
units
}
}
}
Component
{
id
:
propertyPicker
...
...
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