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
3d63d21e
Commit
3d63d21e
authored
Nov 10, 2019
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
19e998a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
17 deletions
+33
-17
MAVLinkInspectorPage.qml
src/AnalyzeView/MAVLinkInspectorPage.qml
+11
-8
MAVLinkMessageButton.qml
src/QmlControls/MAVLinkMessageButton.qml
+22
-9
No files found.
src/AnalyzeView/MAVLinkInspectorPage.qml
View file @
3d63d21e
...
@@ -22,11 +22,12 @@ Item {
...
@@ -22,11 +22,12 @@ Item {
anchors.fill
:
parent
anchors.fill
:
parent
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
property
var
curVehicle
:
controller
?
controller
.
activeVehicle
:
null
property
var
curVehicle
:
controller
?
controller
.
activeVehicle
:
null
property
int
curMessageIndex
:
0
property
int
curMessageIndex
:
0
property
var
curMessage
:
curVehicle
&&
curVehicle
.
messages
.
count
?
curVehicle
.
messages
.
get
(
curMessageIndex
)
:
null
property
var
curMessage
:
curVehicle
&&
curVehicle
.
messages
.
count
?
curVehicle
.
messages
.
get
(
curMessageIndex
)
:
null
property
int
curCompID
:
0
property
int
curCompID
:
0
property
bool
selectionValid
:
false
property
bool
selectionValid
:
false
property
real
maxButtonWidth
:
0
MAVLinkInspectorController
{
MAVLinkInspectorController
{
id
:
controller
id
:
controller
...
@@ -76,11 +77,13 @@ Item {
...
@@ -76,11 +77,13 @@ Item {
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
width
:
buttonCol
.
w
idth
width
:
maxButtonW
idth
contentWidth
:
buttonCol
.
width
contentWidth
:
width
contentHeight
:
buttonCol
.
height
contentHeight
:
buttonCol
.
height
ColumnLayout
{
ColumnLayout
{
id
:
buttonCol
id
:
buttonCol
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
Repeater
{
Repeater
{
model
:
curVehicle
?
curVehicle
.
messages
:
[]
model
:
curVehicle
?
curVehicle
.
messages
:
[]
...
@@ -94,7 +97,7 @@ Item {
...
@@ -94,7 +97,7 @@ Item {
selectionValid
=
true
selectionValid
=
true
curMessageIndex
=
index
curMessageIndex
=
index
}
}
Layout.
minimumWidth
:
ScreenTools
.
defaultFontPixelWidth
*
40
Layout.
fillWidth
:
true
}
}
}
}
}
}
...
...
src/QmlControls/MAVLinkMessageButton.qml
View file @
3d63d21e
...
@@ -18,6 +18,12 @@ Button {
...
@@ -18,6 +18,12 @@ Button {
id
:
control
id
:
control
height
:
ScreenTools
.
defaultFontPixelHeight
*
2
height
:
ScreenTools
.
defaultFontPixelHeight
*
2
autoExclusive
:
true
autoExclusive
:
true
leftPadding
:
ScreenTools
.
defaultFontPixelWidth
rightPadding
:
leftPadding
property
real
_compIDWidth
:
ScreenTools
.
defaultFontPixelWidth
*
3
property
real
_hzWidth
:
ScreenTools
.
defaultFontPixelWidth
*
7
property
real
_nameWidth
:
nameLabel
.
contentWidth
background
:
Rectangle
{
background
:
Rectangle
{
anchors.fill
:
parent
anchors.fill
:
parent
...
@@ -28,20 +34,27 @@ Button {
...
@@ -28,20 +34,27 @@ Button {
property
int
compID
:
0
property
int
compID
:
0
contentItem
:
RowLayout
{
contentItem
:
RowLayout
{
id
:
rowLayout
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
QGCLabel
{
text
:
control
.
compID
text
:
control
.
compID
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
Layout.minimumWidth
:
ScreenTools
.
defaultFontPixelWidth
*
3
Layout.minimumWidth
:
_compIDWidth
}
}
QGCLabel
{
QGCLabel
{
text
:
control
.
text
id
:
nameLabel
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
text
:
control
.
text
Layout.minimumWidth
:
ScreenTools
.
defaultFontPixelWidth
*
28
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
Layout.fillWidth
:
true
}
}
QGCLabel
{
QGCLabel
{
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
text
:
messageHz
.
toFixed
(
1
)
+
'
Hz
'
text
:
messageHz
.
toFixed
(
1
)
+
'
Hz
'
Layout.alignment
:
Qt
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
Layout.minimumWidth
:
_hzWidth
}
}
}
}
Component.onCompleted
:
maxButtonWidth
=
Math
.
max
(
maxButtonWidth
,
_compIDWidth
+
_hzWidth
+
_nameWidth
+
(
rowLayout
.
spacing
*
2
)
+
(
control
.
leftPadding
*
2
))
}
}
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