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
12117523
Commit
12117523
authored
Aug 26, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pairing UI tweaks
parent
bdaa0e3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
59 deletions
+65
-59
PairingIndicator.qml
src/ui/toolbar/PairingIndicator.qml
+65
-59
No files found.
src/ui/toolbar/PairingIndicator.qml
View file @
12117523
...
@@ -24,9 +24,15 @@ Item {
...
@@ -24,9 +24,15 @@ Item {
width
:
pairingRow
.
width
*
1.1
width
:
pairingRow
.
width
*
1.1
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
property
bool
_light
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
&&
!
activeVehicle
property
real
_contentWidth
:
ScreenTools
.
defaultFontPixelWidth
*
30
property
bool
_light
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
&&
!
activeVehicle
property
real
_contentSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
property
real
_contentWidth
:
ScreenTools
.
defaultFontPixelWidth
*
40
property
real
_contentSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
property
real
_rectWidth
:
_contentWidth
property
real
_rectHeight
:
_contentWidth
*
0.75
property
string
kPairingManager
:
qsTr
(
"
Pairing Manager
"
)
Row
{
Row
{
id
:
pairingRow
id
:
pairingRow
spacing
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
ScreenTools
.
defaultFontPixelWidth
...
@@ -49,7 +55,6 @@ Item {
...
@@ -49,7 +55,6 @@ Item {
text
:
qsTr
(
"
Pair Vehicle
"
)
text
:
qsTr
(
"
Pair Vehicle
"
)
width
:
!
activeVehicle
?
(
ScreenTools
.
defaultFontPixelWidth
*
12
)
:
0
width
:
!
activeVehicle
?
(
ScreenTools
.
defaultFontPixelWidth
*
12
)
:
0
visible
:
!
activeVehicle
visible
:
!
activeVehicle
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
font.family
:
ScreenTools
.
demiboldFontFamily
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
@@ -96,21 +101,20 @@ Item {
...
@@ -96,21 +101,20 @@ Item {
anchors.centerIn
:
parent
anchors.centerIn
:
parent
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
QGCLabel
{
QGCLabel
{
text
:
qsTr
(
"
Pair New Vehicle
"
)
text
:
kPairingManager
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
font.family
:
ScreenTools
.
demiboldFontFamily
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
Rectangle
{
Rectangle
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
40
width
:
_rectWidth
height
:
ScreenTools
.
defaultFontPixelHeight
*
8
height
:
_rectHeight
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
border.color
:
qgcPal
.
text
border.color
:
qgcPal
.
text
border.width
:
1
border.width
:
1
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
QGCLabel
{
QGCLabel
{
text
:
"
Graphic
"
text
:
"
Pair
Graphic
"
anchors.centerIn
:
parent
anchors.centerIn
:
parent
}
}
}
}
...
@@ -171,8 +175,7 @@ Item {
...
@@ -171,8 +175,7 @@ Item {
anchors.centerIn
:
parent
anchors.centerIn
:
parent
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
QGCLabel
{
QGCLabel
{
text
:
qsTr
(
"
Pair New Vehicle
"
)
text
:
kPairingManager
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
font.family
:
ScreenTools
.
demiboldFontFamily
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
...
@@ -186,14 +189,14 @@ Item {
...
@@ -186,14 +189,14 @@ Item {
}
}
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
Rectangle
{
Rectangle
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
40
width
:
_rectWidth
height
:
ScreenTools
.
defaultFontPixelHeight
*
8
height
:
_rectHeight
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
border.color
:
qgcPal
.
text
border.color
:
qgcPal
.
text
border.width
:
1
border.width
:
1
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
QGCLabel
{
QGCLabel
{
text
:
"
Graphic
"
text
:
"
Button Positioning
Graphic
"
anchors.centerIn
:
parent
anchors.centerIn
:
parent
}
}
}
}
...
@@ -240,21 +243,20 @@ Item {
...
@@ -240,21 +243,20 @@ Item {
anchors.centerIn
:
parent
anchors.centerIn
:
parent
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
QGCLabel
{
QGCLabel
{
text
:
qsTr
(
"
Pair New Vehicle
"
)
text
:
kPairingManager
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
font.family
:
ScreenTools
.
demiboldFontFamily
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
Rectangle
{
Rectangle
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
40
width
:
_rectWidth
height
:
ScreenTools
.
defaultFontPixelHeight
*
12
height
:
_rectHeight
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
border.color
:
qgcPal
.
text
border.color
:
qgcPal
.
text
border.width
:
1
border.width
:
1
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
QGCLabel
{
QGCLabel
{
text
:
"
Graphic
"
text
:
"
Vehicle and Tablet
Graphic
"
anchors.centerIn
:
parent
anchors.centerIn
:
parent
}
}
}
}
...
@@ -304,16 +306,24 @@ Item {
...
@@ -304,16 +306,24 @@ Item {
height
:
connectionCol
.
height
+
(
ScreenTools
.
defaultFontPixelHeight
*
2
)
height
:
connectionCol
.
height
+
(
ScreenTools
.
defaultFontPixelHeight
*
2
)
anchors.centerIn
:
parent
anchors.centerIn
:
parent
Column
{
Column
{
id
:
connectionCol
id
:
connectionCol
spacing
:
_contentSpacing
*
2
spacing
:
_contentSpacing
anchors.centerIn
:
parent
anchors.centerIn
:
parent
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
QGCLabel
{
QGCLabel
{
text
:
QGroundControl
.
pairingManager
?
QGroundControl
.
pairingManager
.
pairingStatusStr
:
""
text
:
kPairingManager
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
font.family
:
ScreenTools
.
demiboldFontFamily
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
QGCLabel
{
text
:
QGroundControl
.
pairingManager
?
QGroundControl
.
pairingManager
.
pairingStatusStr
:
""
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
Rectangle
{
width
:
_contentWidth
height
:
1
color
:
qgcPal
.
globalTheme
!==
QGCPalette
.
Light
?
Qt
.
rgba
(
1
,
1
,
1
,
0.25
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.25
)
}
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
QGCColoredImage
{
QGCColoredImage
{
id
:
busyIndicator
id
:
busyIndicator
...
@@ -338,7 +348,6 @@ Item {
...
@@ -338,7 +348,6 @@ Item {
QGCLabel
{
QGCLabel
{
text
:
qsTr
(
"
List Of Available Devices
"
)
text
:
qsTr
(
"
List Of Available Devices
"
)
visible
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairedDeviceNameList
.
length
>
0
&&
!
cancelButton
.
visible
)
:
false
visible
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairedDeviceNameList
.
length
>
0
&&
!
cancelButton
.
visible
)
:
false
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
font.family
:
ScreenTools
.
demiboldFontFamily
}
}
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
1
;
}
...
@@ -388,40 +397,37 @@ Item {
...
@@ -388,40 +397,37 @@ Item {
}
}
}
}
}
}
Item
{
width
:
1
;
height
:
1
;
}
Item
{
width
:
1
;
height
:
_contentSpacing
;
}
RowLayout
{
QGCButton
{
id
:
connectedButtons
id
:
connectedButton
visible
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnected
||
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingIdle
)
:
false
width
:
_contentWidth
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
4
visible
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnected
||
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingIdle
)
:
false
anchors.horizontalCenter
:
parent
.
horizontalCenter
text
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnected
?
qsTr
(
"
Done
"
)
:
qsTr
(
"
Close
"
))
:
""
QGCButton
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
text
:
qsTr
(
"
Pair Another
"
)
onClicked
:
{
Layout.minimumWidth
:
_contentWidth
*
0.333
connectionPopup
.
close
()
Layout.fillWidth
:
true
onClicked
:
{
connectionPopup
.
close
()
if
(
QGroundControl
.
pairingManager
.
pairingLinkTypeStrings
.
length
>
1
)
pairingPopup
.
open
()
else
{
mhPopup
.
open
()
}
}
}
}
QGCButton
{
}
text
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnected
?
qsTr
(
"
Go And Fly
"
)
:
qsTr
(
"
Close
"
))
:
""
QGCButton
{
Layout.minimumWidth
:
_contentWidth
*
0.333
text
:
qsTr
(
"
Pair Another
"
)
Layout.fillWidth
:
true
width
:
_contentWidth
onClicked
:
{
visible
:
connectedButton
.
visible
connectionPopup
.
close
()
anchors.horizontalCenter
:
parent
.
horizontalCenter
onClicked
:
{
connectionPopup
.
close
()
if
(
QGroundControl
.
pairingManager
.
pairingLinkTypeStrings
.
length
>
1
)
pairingPopup
.
open
()
else
{
mhPopup
.
open
()
}
}
}
}
}
}
QGCButton
{
QGCButton
{
id
:
cancelButton
id
:
cancelButton
visible
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingActive
||
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnecting
)
:
false
width
:
_contentWidth
text
:
qsTr
(
"
Cancel
"
)
visible
:
QGroundControl
.
pairingManager
?
(
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingActive
||
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingConnecting
)
:
false
width
:
_contentWidth
text
:
qsTr
(
"
Cancel
"
)
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
onClicked
:
{
onClicked
:
{
if
(
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingActive
)
if
(
QGroundControl
.
pairingManager
.
pairingStatus
===
PairingManager
.
PairingActive
)
QGroundControl
.
pairingManager
.
stopPairing
()
QGroundControl
.
pairingManager
.
stopPairing
()
...
@@ -432,10 +438,10 @@ Item {
...
@@ -432,10 +438,10 @@ Item {
}
}
}
}
QGCButton
{
QGCButton
{
visible
:
!
cancelButton
.
visible
&&
!
connectedButtons
.
visible
visible
:
!
cancelButton
.
visible
&&
!
connectedButton
.
visible
text
:
qsTr
(
"
Close
"
)
text
:
qsTr
(
"
Close
"
)
width
:
_contentWidth
width
:
_contentWidth
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
onClicked
:
{
onClicked
:
{
connectionPopup
.
close
()
connectionPopup
.
close
()
}
}
...
...
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