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
896f0783
Commit
896f0783
authored
Oct 19, 2019
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
1b970693
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
249 additions
and
239 deletions
+249
-239
ArmedIndicator.qml
src/ui/toolbar/ArmedIndicator.qml
+6
-7
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+209
-76
MainToolBarIndicators.qml
src/ui/toolbar/MainToolBarIndicators.qml
+17
-136
ModeIndicator.qml
src/ui/toolbar/ModeIndicator.qml
+6
-7
MultiVehicleSelector.qml
src/ui/toolbar/MultiVehicleSelector.qml
+5
-6
VTOLModeIndicator.qml
src/ui/toolbar/VTOLModeIndicator.qml
+6
-7
No files found.
src/ui/toolbar/ArmedIndicator.qml
View file @
896f0783
...
@@ -20,8 +20,7 @@ import QGroundControl.Palette 1.0
...
@@ -20,8 +20,7 @@ import QGroundControl.Palette 1.0
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-- Armed Indicator
//-- Armed Indicator
QGCComboBox
{
QGCComboBox
{
anchors.top
:
parent
.
top
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.bottom
:
parent
.
bottom
alternateText
:
_armed
?
qsTr
(
"
Armed
"
)
:
qsTr
(
"
Disarmed
"
)
alternateText
:
_armed
?
qsTr
(
"
Armed
"
)
:
qsTr
(
"
Disarmed
"
)
model
:
[
qsTr
(
"
Arm
"
),
qsTr
(
"
Disarm
"
)
]
model
:
[
qsTr
(
"
Arm
"
),
qsTr
(
"
Disarm
"
)
]
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.pointSize
:
ScreenTools
.
mediumFontPointSize
...
...
src/ui/toolbar/MainToolBar.qml
View file @
896f0783
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
import
QtQuick
2.11
import
QtQuick
2.11
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Layouts
1.11
import
QtQuick
.
Layouts
1.11
import
QtQuick
.
Dialogs
1.3
import
QGroundControl
1.0
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
...
@@ -36,6 +37,45 @@ Item {
...
@@ -36,6 +37,45 @@ Item {
visible
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
visible
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
}
}
//-------------------------------------------------------------------------
// Easter egg mechanism
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
_clickCount
++
eggTimer
.
restart
()
if
(
_clickCount
==
5
)
{
if
(
!
QGroundControl
.
corePlugin
.
showAdvancedUI
)
{
advancedModeConfirmation
.
open
()
}
else
{
QGroundControl
.
corePlugin
.
showAdvancedUI
=
false
}
}
else
if
(
_clickCount
==
7
)
{
QGroundControl
.
corePlugin
.
showTouchAreas
=
!
QGroundControl
.
corePlugin
.
showTouchAreas
}
}
property
int
_clickCount
:
0
Timer
{
id
:
eggTimer
interval
:
1000
repeat
:
false
onTriggered
:
parent
.
_clickCount
=
0
}
MessageDialog
{
id
:
advancedModeConfirmation
title
:
qsTr
(
"
Advanced Mode
"
)
text
:
QGroundControl
.
corePlugin
.
showAdvancedUIMessage
standardButtons
:
StandardButton
.
Yes
|
StandardButton
.
No
onYes
:
{
QGroundControl
.
corePlugin
.
showAdvancedUI
=
true
advancedModeConfirmation
.
close
()
}
}
}
//-- Setup can be invoked from c++ side
//-- Setup can be invoked from c++ side
Connections
{
Connections
{
target
:
setupWindow
target
:
setupWindow
...
@@ -46,10 +86,16 @@ Item {
...
@@ -46,10 +86,16 @@ Item {
}
}
}
}
QGCFlickable
{
anchors.fill
:
parent
contentWidth
:
toolbarRow
.
width
flickableDirection
:
Flickable
.
HorizontalFlick
RowLayout
{
RowLayout
{
id
:
toolbarRow
anchors.bottomMargin
:
1
anchors.bottomMargin
:
1
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.top
:
parent
.
top
anchors.fill
:
parent
anchors.bottom
:
parent
.
bottom
spacing
:
ScreenTools
.
defaultFontPixelWidth
/
2
spacing
:
ScreenTools
.
defaultFontPixelWidth
/
2
ButtonGroup
{
ButtonGroup
{
...
@@ -58,15 +104,14 @@ Item {
...
@@ -58,15 +104,14 @@ Item {
//---------------------------------------------
//---------------------------------------------
// Toolbar Row
// Toolbar Row
Row
{
RowLayout
{
id
:
viewRow
id
:
viewRow
Layout.fillHeight
:
true
Layout.fillHeight
:
true
spacing
:
ScreenTools
.
defaultFontPixelWidth
/
2
spacing
:
0
QGCToolBarButton
{
QGCToolBarButton
{
id
:
settingsButton
id
:
settingsButton
anchors.top
:
parent
.
top
Layout.fillHeight
:
true
anchors.bottom
:
parent
.
bottom
icon.source
:
"
/res/QGCLogoWhite
"
icon.source
:
"
/res/QGCLogoWhite
"
logo
:
true
logo
:
true
visible
:
!
QGroundControl
.
corePlugin
.
options
.
combineSettingsAndSetup
visible
:
!
QGroundControl
.
corePlugin
.
options
.
combineSettingsAndSetup
...
@@ -78,8 +123,7 @@ Item {
...
@@ -78,8 +123,7 @@ Item {
QGCToolBarButton
{
QGCToolBarButton
{
id
:
setupButton
id
:
setupButton
anchors.top
:
parent
.
top
Layout.fillHeight
:
true
anchors.bottom
:
parent
.
bottom
icon.source
:
"
/qmlimages/Gears.svg
"
icon.source
:
"
/qmlimages/Gears.svg
"
onClicked
:
{
onClicked
:
{
checked
=
true
checked
=
true
...
@@ -89,8 +133,7 @@ Item {
...
@@ -89,8 +133,7 @@ Item {
QGCToolBarButton
{
QGCToolBarButton
{
id
:
planButton
id
:
planButton
anchors.top
:
parent
.
top
Layout.fillHeight
:
true
anchors.bottom
:
parent
.
bottom
icon.source
:
"
/qmlimages/Plan.svg
"
icon.source
:
"
/qmlimages/Plan.svg
"
onClicked
:
{
onClicked
:
{
checked
=
true
checked
=
true
...
@@ -100,8 +143,7 @@ Item {
...
@@ -100,8 +143,7 @@ Item {
QGCToolBarButton
{
QGCToolBarButton
{
id
:
flyButton
id
:
flyButton
anchors.top
:
parent
.
top
Layout.fillHeight
:
true
anchors.bottom
:
parent
.
bottom
icon.source
:
"
/qmlimages/PaperPlane.svg
"
icon.source
:
"
/qmlimages/PaperPlane.svg
"
onClicked
:
{
onClicked
:
{
checked
=
true
checked
=
true
...
@@ -111,8 +153,7 @@ Item {
...
@@ -111,8 +153,7 @@ Item {
QGCToolBarButton
{
QGCToolBarButton
{
id
:
analyzeButton
id
:
analyzeButton
anchors.top
:
parent
.
top
Layout.fillHeight
:
true
anchors.bottom
:
parent
.
bottom
icon.source
:
"
/qmlimages/Analyze.svg
"
icon.source
:
"
/qmlimages/Analyze.svg
"
visible
:
QGroundControl
.
corePlugin
.
showAdvancedUI
visible
:
QGroundControl
.
corePlugin
.
showAdvancedUI
onClicked
:
{
onClicked
:
{
...
@@ -121,24 +162,72 @@ Item {
...
@@ -121,24 +162,72 @@ Item {
}
}
}
}
Item
{
Layout.fillHeight
:
true
width
:
ScreenTools
.
defaultFontPixelWidth
/
2
visible
:
activeVehicle
}
Rectangle
{
Rectangle
{
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
Layout.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.top
:
parent
.
top
Layout.fillHeight
:
true
anchors.bottom
:
parent
.
bottom
width
:
1
width
:
1
color
:
qgcPal
.
text
color
:
qgcPal
.
text
visible
:
activeVehicle
visible
:
activeVehicle
}
}
Item
{
Layout.fillHeight
:
true
width
:
ScreenTools
.
defaultFontPixelWidth
/
2
visible
:
activeVehicle
}
}
}
Loader
{
Loader
{
id
:
toolbarIndicators
id
:
toolbarIndicators
height
:
parent
.
height
Layout.fillHeight
:
true
source
:
"
/toolbar/MainToolBarIndicators.qml
"
source
:
"
/toolbar/MainToolBarIndicators.qml
"
Layout.fillWidth
:
true
visible
:
activeVehicle
&&
!
communicationLost
}
}
}
}
}
//-------------------------------------------------------------------------
//-- Branding Logo
Image
{
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.66
visible
:
activeVehicle
&&
!
communicationLost
&&
x
>
(
toolbarRow
.
x
+
toolbarRow
.
width
+
ScreenTools
.
defaultFontPixelWidth
)
fillMode
:
Image
.
PreserveAspectFit
source
:
_outdoorPalette
?
_brandImageOutdoor
:
_brandImageIndoor
mipmap
:
true
property
bool
_outdoorPalette
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
property
bool
_corePluginBranding
:
QGroundControl
.
corePlugin
.
brandImageIndoor
.
length
!=
0
property
string
_userBrandImageIndoor
:
QGroundControl
.
settingsManager
.
brandImageSettings
.
userBrandImageIndoor
.
value
property
string
_userBrandImageOutdoor
:
QGroundControl
.
settingsManager
.
brandImageSettings
.
userBrandImageOutdoor
.
value
property
bool
_userBrandingIndoor
:
_userBrandImageIndoor
.
length
!=
0
property
bool
_userBrandingOutdoor
:
_userBrandImageOutdoor
.
length
!=
0
property
string
_brandImageIndoor
:
_userBrandingIndoor
?
_userBrandImageIndoor
:
(
_userBrandingOutdoor
?
_userBrandImageOutdoor
:
(
_corePluginBranding
?
QGroundControl
.
corePlugin
.
brandImageIndoor
:
(
activeVehicle
?
activeVehicle
.
brandImageIndoor
:
""
)
)
)
property
string
_brandImageOutdoor
:
_userBrandingOutdoor
?
_userBrandImageOutdoor
:
(
_userBrandingIndoor
?
_userBrandImageIndoor
:
(
_corePluginBranding
?
QGroundControl
.
corePlugin
.
brandImageOutdoor
:
(
activeVehicle
?
activeVehicle
.
brandImageOutdoor
:
""
)
)
)
}
// Small parameter download progress bar
// Small parameter download progress bar
Rectangle
{
Rectangle
{
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
...
@@ -194,4 +283,48 @@ Item {
...
@@ -194,4 +283,48 @@ Item {
onClicked
:
largeProgressBar
.
_userHide
=
true
onClicked
:
largeProgressBar
.
_userHide
=
true
}
}
}
}
//-------------------------------------------------------------------------
//-- Waiting for a vehicle
QGCLabel
{
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
Waiting For Vehicle Connection
"
)
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
color
:
qgcPal
.
colorRed
visible
:
!
activeVehicle
}
//-------------------------------------------------------------------------
//-- Connection Status
Row
{
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
layoutDirection
:
Qt
.
RightToLeft
spacing
:
ScreenTools
.
defaultFontPixelWidth
visible
:
activeVehicle
&&
communicationLost
QGCButton
{
id
:
disconnectButton
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
Disconnect
"
)
primary
:
true
onClicked
:
activeVehicle
.
disconnectInactiveVehicle
()
}
QGCLabel
{
id
:
connectionLost
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
COMMUNICATION LOST
"
)
font.pointSize
:
ScreenTools
.
largeFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
color
:
qgcPal
.
colorRed
}
}
}
}
src/ui/toolbar/MainToolBarIndicators.qml
View file @
896f0783
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
import
QtQuick
2.11
import
QtQuick
2.11
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Dialogs
1.3
import
QtQuick
.
Layouts
1.11
import
QtQuick
.
Layouts
1.11
import
QGroundControl
1.0
import
QGroundControl
1.0
...
@@ -18,69 +17,14 @@ import QGroundControl.MultiVehicleManager 1.0
...
@@ -18,69 +17,14 @@ import QGroundControl.MultiVehicleManager 1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Palette
1.0
Item
{
//-------------------------------------------------------------------------
//-- Toolbar Indicators
//-------------------------------------------------------------------------
Row
{
// Easter egg mechanism
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
_clickCount
++
eggTimer
.
restart
()
if
(
_clickCount
==
5
)
{
if
(
!
QGroundControl
.
corePlugin
.
showAdvancedUI
)
{
advancedModeConfirmation
.
open
()
}
else
{
QGroundControl
.
corePlugin
.
showAdvancedUI
=
false
}
}
else
if
(
_clickCount
==
7
)
{
QGroundControl
.
corePlugin
.
showTouchAreas
=
!
QGroundControl
.
corePlugin
.
showTouchAreas
}
}
property
int
_clickCount
:
0
Timer
{
id
:
eggTimer
interval
:
1000
repeat
:
false
onTriggered
:
parent
.
_clickCount
=
0
}
MessageDialog
{
id
:
advancedModeConfirmation
title
:
qsTr
(
"
Advanced Mode
"
)
text
:
QGroundControl
.
corePlugin
.
showAdvancedUIMessage
standardButtons
:
StandardButton
.
Yes
|
StandardButton
.
No
onYes
:
{
QGroundControl
.
corePlugin
.
showAdvancedUI
=
true
advancedModeConfirmation
.
close
()
}
}
}
//-------------------------------------------------------------------------
//-- Waiting for a vehicle
QGCLabel
{
id
:
waitForVehicle
anchors.centerIn
:
parent
text
:
qsTr
(
"
Waiting For Vehicle Connection
"
)
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
color
:
qgcPal
.
colorRed
visible
:
!
activeVehicle
}
//-------------------------------------------------------------------------
//-- Toolbar Indicators
Row
{
id
:
indicatorRow
id
:
indicatorRow
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
2
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
1.5
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
1.5
visible
:
activeVehicle
&&
!
communicationLost
Repeater
{
Repeater
{
model
:
activeVehicle
?
activeVehicle
.
toolBarIndicators
:
[]
model
:
activeVehicle
?
activeVehicle
.
toolBarIndicators
:
[]
Loader
{
Loader
{
...
@@ -92,67 +36,4 @@ Item {
...
@@ -92,67 +36,4 @@ Item {
visible
:
item
.
showIndicator
visible
:
item
.
showIndicator
}
}
}
}
}
//-------------------------------------------------------------------------
//-- Branding Logo
Image
{
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.66
visible
:
activeVehicle
&&
!
communicationLost
&&
x
>
(
indicatorRow
.
x
+
indicatorRow
.
width
+
ScreenTools
.
defaultFontPixelWidth
)
fillMode
:
Image
.
PreserveAspectFit
source
:
_outdoorPalette
?
_brandImageOutdoor
:
_brandImageIndoor
mipmap
:
true
property
bool
_outdoorPalette
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
property
bool
_corePluginBranding
:
QGroundControl
.
corePlugin
.
brandImageIndoor
.
length
!=
0
property
string
_userBrandImageIndoor
:
QGroundControl
.
settingsManager
.
brandImageSettings
.
userBrandImageIndoor
.
value
property
string
_userBrandImageOutdoor
:
QGroundControl
.
settingsManager
.
brandImageSettings
.
userBrandImageOutdoor
.
value
property
bool
_userBrandingIndoor
:
_userBrandImageIndoor
.
length
!=
0
property
bool
_userBrandingOutdoor
:
_userBrandImageOutdoor
.
length
!=
0
property
string
_brandImageIndoor
:
_userBrandingIndoor
?
_userBrandImageIndoor
:
(
_userBrandingOutdoor
?
_userBrandImageOutdoor
:
(
_corePluginBranding
?
QGroundControl
.
corePlugin
.
brandImageIndoor
:
(
activeVehicle
?
activeVehicle
.
brandImageIndoor
:
""
)
)
)
property
string
_brandImageOutdoor
:
_userBrandingOutdoor
?
_userBrandImageOutdoor
:
(
_userBrandingIndoor
?
_userBrandImageIndoor
:
(
_corePluginBranding
?
QGroundControl
.
corePlugin
.
brandImageOutdoor
:
(
activeVehicle
?
activeVehicle
.
brandImageOutdoor
:
""
)
)
)
}
//-------------------------------------------------------------------------
//-- Connection Status
Row
{
anchors.fill
:
parent
layoutDirection
:
Qt
.
RightToLeft
spacing
:
ScreenTools
.
defaultFontPixelWidth
visible
:
activeVehicle
&&
communicationLost
QGCButton
{
id
:
disconnectButton
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
Disconnect
"
)
primary
:
true
onClicked
:
activeVehicle
.
disconnectInactiveVehicle
()
}
QGCLabel
{
id
:
connectionLost
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
COMMUNICATION LOST
"
)
font.pointSize
:
ScreenTools
.
largeFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
color
:
qgcPal
.
colorRed
}
}
}
}
src/ui/toolbar/ModeIndicator.qml
View file @
896f0783
...
@@ -20,8 +20,7 @@ import QGroundControl.Palette 1.0
...
@@ -20,8 +20,7 @@ import QGroundControl.Palette 1.0
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-- Mode Indicator
//-- Mode Indicator
QGCComboBox
{
QGCComboBox
{
anchors.top
:
parent
.
top
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.bottom
:
parent
.
bottom
alternateText
:
_activeVehicle
?
_activeVehicle
.
flightMode
:
""
alternateText
:
_activeVehicle
?
_activeVehicle
.
flightMode
:
""
model
:
_flightModes
model
:
_flightModes
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.pointSize
:
ScreenTools
.
mediumFontPointSize
...
...
src/ui/toolbar/MultiVehicleSelector.qml
View file @
896f0783
...
@@ -20,8 +20,7 @@ import QGroundControl.Palette 1.0
...
@@ -20,8 +20,7 @@ import QGroundControl.Palette 1.0
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-- Multiple Vehicle Selector
//-- Multiple Vehicle Selector
QGCComboBox
{
QGCComboBox
{
anchors.top
:
parent
.
top
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.bottom
:
parent
.
bottom
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.pointSize
:
ScreenTools
.
mediumFontPointSize
currentIndex
:
-
1
currentIndex
:
-
1
sizeToContents
:
true
sizeToContents
:
true
...
...
src/ui/toolbar/VTOLModeIndicator.qml
View file @
896f0783
...
@@ -20,8 +20,7 @@ import QGroundControl.Palette 1.0
...
@@ -20,8 +20,7 @@ import QGroundControl.Palette 1.0
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-- VTOL Mode Indicator
//-- VTOL Mode Indicator
QGCLabel
{
QGCLabel
{
anchors.top
:
parent
.
top
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.bottom
:
parent
.
bottom
verticalAlignment
:
Text
.
AlignVCenter
verticalAlignment
:
Text
.
AlignVCenter
text
:
_fwdFlight
?
qsTr
(
"
VTOL: Fixed Wing
"
)
:
qsTr
(
"
VTOL: Multi-Rotor
"
)
text
:
_fwdFlight
?
qsTr
(
"
VTOL: Fixed Wing
"
)
:
qsTr
(
"
VTOL: Multi-Rotor
"
)
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.pointSize
:
ScreenTools
.
mediumFontPointSize
...
...
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