Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
04307f7b
Commit
04307f7b
authored
Jan 26, 2018
by
Gus Grubba
Browse files
Remove boost (must create a symlink for now)
Adjust Airspace control text color to match changing background color
parent
f91c3ae6
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
04307f7b
...
...
@@ -84,3 +84,4 @@ src/latex/
.vagrant/
Qt*-linux*.tar.*
libs/airmapd/include/boost
src/Airmap/AirspaceControl.qml
View file @
04307f7b
...
...
@@ -23,8 +23,10 @@ Item {
property
bool
showColapse
:
true
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
validRules
:
_activeVehicle
?
_activeVehicle
.
airspaceController
.
rulesets
.
valid
:
false
property
bool
validAdvisories
:
_activeVehicle
?
_activeVehicle
.
airspaceController
.
advisories
.
valid
:
false
property
color
_airspaceColor
:
_validAdvisories
?
getAispaceColor
(
_activeVehicle
.
airspaceController
.
advisories
.
airspaceColor
)
:
_colorGray
property
bool
_validRules
:
_activeVehicle
?
_activeVehicle
.
airspaceController
.
rulesets
.
valid
:
false
property
bool
_validAdvisories
:
_activeVehicle
?
_activeVehicle
.
airspaceController
.
advisories
.
valid
:
false
property
color
_textColor
:
qgcPal
.
text
readonly
property
real
_radius
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
readonly
property
color
_colorOrange
:
"
#d75e0d
"
...
...
@@ -50,13 +52,23 @@ Item {
return
_colorGray
;
}
on_AirspaceColorChanged
:
{
if
(
_validAdvisories
)
{
if
(
_activeVehicle
.
airspaceController
.
advisories
.
airspaceColor
===
AirspaceAdvisoryProvider
.
Yellow
)
{
_textColor
=
"
#000000
"
return
}
}
_textColor
=
_colorWhite
}
//---------------------------------------------------------------
//-- Colapsed State
Rectangle
{
id
:
colapsedRect
width
:
parent
.
width
height
:
colapsed
?
colapsedRow
.
height
+
ScreenTools
.
defaultFontPixelHeight
:
0
color
:
validAdvisories
?
getAispaceColor
(
_activeVehicle
.
airspaceController
.
advisories
.
airspaceColor
)
:
_colorGray
color
:
_
validAdvisories
?
getAispaceColor
(
_activeVehicle
.
airspaceController
.
advisories
.
airspaceColor
)
:
_colorGray
radius
:
_radius
visible
:
colapsed
Row
{
...
...
@@ -70,12 +82,12 @@ Item {
height
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
sourceSize.height
:
height
source
:
"
qrc:/airmap/advisory-icon.svg
"
color
:
_
colorWhite
color
:
_
textColor
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
text
:
qsTr
(
"
Airspace
"
)
color
:
_
colorWhite
color
:
_
textColor
anchors.verticalCenter
:
parent
.
verticalCenter
}
Item
{
...
...
@@ -85,6 +97,7 @@ Item {
AirspaceWeather
{
iconHeight
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
weatherInfo
.
valid
contentColor
:
_textColor
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
...
@@ -93,7 +106,7 @@ Item {
height
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
sourceSize.height
:
height
source
:
"
qrc:/airmap/expand.svg
"
color
:
_
colorWhite
color
:
_
textColor
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.verticalCenter
:
parent
.
verticalCenter
...
...
@@ -109,7 +122,7 @@ Item {
id
:
expandedRect
width
:
parent
.
width
height
:
!
colapsed
?
expandedCol
.
height
+
ScreenTools
.
defaultFontPixelHeight
:
0
color
:
validAdvisories
?
getAispaceColor
(
_activeVehicle
.
airspaceController
.
advisories
.
airspaceColor
)
:
_colorGray
color
:
_
validAdvisories
?
getAispaceColor
(
_activeVehicle
.
airspaceController
.
advisories
.
airspaceColor
)
:
_colorGray
radius
:
_radius
visible
:
!
colapsed
MouseArea
{
...
...
@@ -139,7 +152,7 @@ Item {
height
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
sourceSize.height
:
height
source
:
"
qrc:/airmap/advisory-icon.svg
"
color
:
_
colorWhite
color
:
_
textColor
anchors.verticalCenter
:
parent
.
verticalCenter
}
Column
{
...
...
@@ -147,12 +160,12 @@ Item {
anchors.verticalCenter
:
parent
.
verticalCenter
QGCLabel
{
text
:
qsTr
(
"
Airspace
"
)
color
:
_
colorWhite
color
:
_
textColor
}
QGCLabel
{
text
:
validAdvisories
?
_activeVehicle
.
airspaceController
.
advisories
.
airspaces
.
count
+
qsTr
(
"
Advisories
"
)
:
""
color
:
_
colorWhite
visible
:
validAdvisories
text
:
_
validAdvisories
?
_activeVehicle
.
airspaceController
.
advisories
.
airspaces
.
count
+
qsTr
(
"
Advisories
"
)
:
""
color
:
_
textColor
visible
:
_
validAdvisories
font.pointSize
:
ScreenTools
.
smallFontPointSize
}
}
...
...
@@ -162,6 +175,7 @@ Item {
}
AirspaceWeather
{
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
weatherInfo
.
valid
&&
showColapse
contentColor
:
_textColor
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
...
@@ -170,7 +184,7 @@ Item {
height
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
sourceSize.height
:
height
source
:
"
qrc:/airmap/colapse.svg
"
color
:
_
colorWhite
color
:
_
textColor
visible
:
showColapse
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
...
...
@@ -183,6 +197,7 @@ Item {
}
AirspaceWeather
{
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
weatherInfo
.
valid
&&
!
showColapse
contentColor
:
_textColor
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.verticalCenter
:
parent
.
verticalCenter
...
...
@@ -270,10 +285,10 @@ Item {
Layout.fillWidth
:
true
QGCLabel
{
id
:
regLabel
text
:
validRules
?
_activeVehicle
.
airspaceController
.
rulesets
.
rules
.
get
(
currentIndex
).
name
:
qsTr
(
"
None
"
)
text
:
_
validRules
?
_activeVehicle
.
airspaceController
.
rulesets
.
rules
.
get
(
currentIndex
).
name
:
qsTr
(
"
None
"
)
color
:
_colorWhite
anchors.centerIn
:
parent
property
int
currentIndex
:
validRules
?
_activeVehicle
.
airspaceController
.
rulesets
.
currentIndex
:
0
property
int
currentIndex
:
_
validRules
?
_activeVehicle
.
airspaceController
.
rulesets
.
currentIndex
:
0
}
}
}
...
...
@@ -294,7 +309,7 @@ Item {
anchors.right
:
parent
.
right
anchors.left
:
parent
.
left
Repeater
{
model
:
validAdvisories
?
_activeVehicle
.
airspaceController
.
advisories
.
airspaces
:
[]
model
:
_
validAdvisories
?
_activeVehicle
.
airspaceController
.
advisories
.
airspaces
:
[]
delegate
:
AirspaceRegulation
{
regTitle
:
object
.
typeStr
regText
:
object
.
name
...
...
@@ -312,7 +327,7 @@ Item {
//-- Footer
QGCLabel
{
text
:
qsTr
(
"
Powered by <b>AIRMAP</b>
"
)
color
:
_
colorWhite
color
:
_
textColor
font.pointSize
:
ScreenTools
.
smallFontPointSize
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
...
...
@@ -399,7 +414,7 @@ Item {
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
2
}
Repeater
{
model
:
validRules
?
_activeVehicle
.
airspaceController
.
rulesets
.
rules
:
[]
model
:
_
validRules
?
_activeVehicle
.
airspaceController
.
rulesets
.
rules
:
[]
delegate
:
RuleSelector
{
visible
:
object
.
selectionType
===
AirspaceRule
.
Pickone
rule
:
object
...
...
@@ -419,7 +434,7 @@ Item {
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
2
}
Repeater
{
model
:
validRules
?
_activeVehicle
.
airspaceController
.
rulesets
.
rules
:
[]
model
:
_
validRules
?
_activeVehicle
.
airspaceController
.
rulesets
.
rules
:
[]
delegate
:
RuleSelector
{
visible
:
object
.
selectionType
===
AirspaceRule
.
Optional
rule
:
object
...
...
@@ -439,7 +454,7 @@ Item {
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
2
}
Repeater
{
model
:
validRules
?
_activeVehicle
.
airspaceController
.
rulesets
.
rules
:
[]
model
:
_
validRules
?
_activeVehicle
.
airspaceController
.
rulesets
.
rules
:
[]
delegate
:
RuleSelector
{
visible
:
object
.
selectionType
===
AirspaceRule
.
Required
rule
:
object
...
...
src/Airmap/AirspaceWeather.qml
View file @
04307f7b
...
...
@@ -14,9 +14,9 @@ import QGroundControl.SettingsManager 1.0
Item
{
height
:
_valid
?
weatherRow
.
height
:
0
width
:
_valid
?
weatherRow
.
width
:
0
property
color
contentColor
:
"
#ffffff
"
property
var
iconHeight
:
ScreenTools
.
defaultFontPixelWidth
*
4
property
bool
_valid
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
weatherInfo
.
valid
property
color
_colorWhite
:
"
#ffffff
"
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
_celcius
:
QGroundControl
.
settingsManager
.
unitsSettings
.
temperatureUnits
.
rawValue
===
UnitsSettings
.
TemperatureUnitsCelsius
property
int
_tempC
:
_valid
?
_activeVehicle
.
airspaceController
.
weatherInfo
.
temperature
:
0
...
...
@@ -29,13 +29,13 @@ Item {
height
:
iconHeight
sourceSize.height
:
height
source
:
_valid
?
_activeVehicle
.
airspaceController
.
weatherInfo
.
icon
:
""
color
:
_
co
lorWhite
color
:
co
ntentColor
visible
:
_valid
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
text
:
_tempS
color
:
_
co
lorWhite
color
:
co
ntentColor
visible
:
_valid
anchors.verticalCenter
:
parent
.
verticalCenter
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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