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
55bf2f59
Commit
55bf2f59
authored
Feb 20, 2018
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added flight info and flight brief UI. It's not yet wired to live, real data.
parent
a6ea3d79
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
434 additions
and
51 deletions
+434
-51
AirMapManager.cc
src/Airmap/AirMapManager.cc
+2
-2
AirspaceControl.qml
src/Airmap/AirspaceControl.qml
+308
-25
AirspaceWeather.qml
src/Airmap/AirspaceWeather.qml
+1
-0
ComplianceRules.qml
src/Airmap/ComplianceRules.qml
+54
-0
FlightFeature.qml
src/Airmap/FlightFeature.qml
+36
-0
QGroundControl.Airmap.qmldir
src/Airmap/QGroundControl.Airmap.qmldir
+3
-1
airmap.qrc
src/Airmap/airmap.qrc
+2
-0
QGCButton.qml
src/QmlControls/QGCButton.qml
+28
-23
No files found.
src/Airmap/AirMapManager.cc
View file @
55bf2f59
...
...
@@ -37,8 +37,8 @@ AirMapManager::AirMapManager(QGCApplication* app, QGCToolbox* toolbox)
{
_logger
=
std
::
make_shared
<
qt
::
Logger
>
();
qt
::
register_types
();
// TODO: still needed?
_logger
->
logging_category
().
setEnabled
(
QtDebugMsg
,
tru
e
);
_logger
->
logging_category
().
setEnabled
(
QtInfoMsg
,
tru
e
);
_logger
->
logging_category
().
setEnabled
(
QtDebugMsg
,
fals
e
);
_logger
->
logging_category
().
setEnabled
(
QtInfoMsg
,
fals
e
);
_logger
->
logging_category
().
setEnabled
(
QtWarningMsg
,
true
);
_dispatchingLogger
=
std
::
make_shared
<
qt
::
DispatchingLogger
>
(
_logger
);
connect
(
&
_shared
,
&
AirMapSharedState
::
error
,
this
,
&
AirMapManager
::
_error
);
...
...
src/Airmap/AirspaceControl.qml
View file @
55bf2f59
This diff is collapsed.
Click to expand it.
src/Airmap/AirspaceWeather.qml
View file @
55bf2f59
...
...
@@ -31,6 +31,7 @@ Item {
source
:
_valid
?
QGroundControl
.
airspaceManager
.
weatherInfo
.
icon
:
""
color
:
contentColor
visible
:
_valid
fillMode
:
Image
.
PreserveAspectFit
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
...
...
src/Airmap/ComplianceRules.qml
0 → 100644
View file @
55bf2f59
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.4
import
QtQuick
.
Dialogs
1.2
import
QtQml
2.2
import
QGroundControl
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Airmap
1.0
import
QGroundControl
.
SettingsManager
1.0
Item
{
id
:
_root
height
:
ScreenTools
.
defaultFontPixelHeight
*
2
property
alias
text
:
title
.
text
readonly
property
color
_colorOrange
:
"
#d75e0d
"
readonly
property
color
_colorYellow
:
"
#d7c61d
"
readonly
property
color
_colorRed
:
"
#aa1200
"
readonly
property
color
_colorGreen
:
"
#125f00
"
QGCPalette
{
id
:
qgcPal
colorGroupEnabled
:
enabled
}
Rectangle
{
anchors.fill
:
parent
color
:
qgcPal
.
windowShade
}
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
2
anchors.verticalCenter
:
parent
.
verticalCenter
Rectangle
{
height
:
_root
.
height
width
:
ScreenTools
.
defaultFontPixelWidth
*
0.75
color
:
_colorGreen
}
QGCLabel
{
id
:
title
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
QGCColoredImage
{
source
:
"
qrc:/airmap/expand.svg
"
height
:
ScreenTools
.
defaultFontPixelHeight
width
:
height
color
:
qgcPal
.
text
fillMode
:
Image
.
PreserveAspectFit
sourceSize.height
:
height
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
src/Airmap/FlightFeature.qml
0 → 100644
View file @
55bf2f59
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.4
import
QtQuick
.
Dialogs
1.2
import
QtQml
2.2
import
QGroundControl
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Airmap
1.0
import
QGroundControl
.
SettingsManager
1.0
Rectangle
{
id
:
_root
height
:
questionCol
.
height
+
(
ScreenTools
.
defaultFontPixelHeight
*
1.25
)
color
:
qgcPal
.
windowShade
QGCPalette
{
id
:
qgcPal
colorGroupEnabled
:
enabled
}
Column
{
id
:
questionCol
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.centerIn
:
parent
QGCLabel
{
text
:
"
Question?
"
anchors.left
:
questionText
.
left
}
QGCTextField
{
id
:
questionText
width
:
_root
.
width
-
(
ScreenTools
.
defaultFontPixelWidth
*
2
)
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
}
src/Airmap/QGroundControl.Airmap.qmldir
View file @
55bf2f59
...
...
@@ -3,4 +3,6 @@ Module QGroundControl.Airmap
AirspaceControl 1.0 AirspaceControl.qml
AirspaceRegulation 1.0 AirspaceRegulation.qml
AirspaceWeather 1.0 AirspaceWeather.qml
ComplianceRules 1.0 ComplianceRules.qml
FlightFeature 1.0 FlightFeature.qml
RuleSelector 1.0 RuleSelector.qml
src/Airmap/airmap.qrc
View file @
55bf2f59
...
...
@@ -4,6 +4,8 @@
<file alias="QGroundControl/Airmap/AirspaceControl.qml">AirspaceControl.qml</file>
<file alias="QGroundControl/Airmap/AirspaceRegulation.qml">AirspaceRegulation.qml</file>
<file alias="QGroundControl/Airmap/AirspaceWeather.qml">AirspaceWeather.qml</file>
<file alias="QGroundControl/Airmap/ComplianceRules.qml">ComplianceRules.qml</file>
<file alias="QGroundControl/Airmap/FlightFeature.qml">FlightFeature.qml</file>
<file alias="QGroundControl/Airmap/qmldir">QGroundControl.Airmap.qmldir</file>
<file alias="QGroundControl/Airmap/RuleSelector.qml">RuleSelector.qml</file>
</qresource>
...
...
src/QmlControls/QGCButton.qml
View file @
55bf2f59
...
...
@@ -9,6 +9,7 @@ Button {
property
bool
primary
:
false
///< primary button for a group of buttons
property
real
pointSize
:
ScreenTools
.
defaultFontPointSize
///< Point size for button text
property
bool
showBorder
:
_qgcPal
.
globalTheme
===
QGCPalette
.
Light
property
bool
iconLeft
:
false
property
real
backRadius
:
0
property
real
heightFactor
:
0.5
...
...
@@ -73,23 +74,28 @@ Button {
/*! This defines the label of the button. */
label
:
Item
{
implicitWidth
:
row
.
implicitW
idth
implicitHeight
:
row
.
implicitHeight
baselineOffset
:
row
.
y
+
text
.
y
+
text
.
baselineOffset
implicitWidth
:
text
.
implicitWidth
+
icon
.
w
idth
implicitHeight
:
text
.
implicitHeight
baselineOffset
:
text
.
y
+
text
.
baselineOffset
Row
{
id
:
row
anchors.centerIn
:
parent
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
0.25
Image
{
QGCColoredImage
{
id
:
icon
source
:
control
.
iconSource
height
:
source
===
""
?
0
:
text
.
height
width
:
height
color
:
text
.
color
fillMode
:
Image
.
PreserveAspectFit
sourceSize.height
:
height
anchors.left
:
control
.
iconLeft
?
parent
.
left
:
undefined
anchors.leftMargin
:
control
.
iconLeft
?
ScreenTools
.
defaultFontPixelWidth
:
undefined
anchors.right
:
!
control
.
iconLeft
?
parent
.
right
:
undefined
anchors.rightMargin
:
!
control
.
iconLeft
?
ScreenTools
.
defaultFontPixelWidth
:
undefined
anchors.verticalCenter
:
parent
.
verticalCenter
}
Text
{
id
:
text
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.centerIn
:
parent
antialiasing
:
true
text
:
control
.
text
font.pointSize
:
pointSize
...
...
@@ -100,5 +106,4 @@ Button {
}
}
}
}
}
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