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
0ed9bf70
Commit
0ed9bf70
authored
Dec 28, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2488 from DonLakeFlyer/Airframe
Airframe Config: Changes to UI style
parents
9ae456cb
3ad3af5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
59 deletions
+61
-59
AirframeComponent.qml
src/AutoPilotPlugins/PX4/AirframeComponent.qml
+61
-59
No files found.
src/AutoPilotPlugins/PX4/AirframeComponent.qml
View file @
0ed9bf70
...
...
@@ -104,9 +104,8 @@ QGCView {
QGCLabel
{
anchors.fill
:
parent
wrapMode
:
Text
.
WordWrap
text
:
"
Clicking Apply will save the changes you have made to your aiframe configuration.
"
+
"
Your vehicle will also be rebooted in order to complete the process.
"
+
"
After your vehicle reboots, you can reconnect it to QGroundControl.
"
text
:
"
Clicking “Apply” will save the changes you have made to your airframe configuration.
"
+
"
Your vehicle will also be restarted in order to complete the process.
"
}
}
}
...
...
@@ -127,7 +126,9 @@ QGCView {
QGCLabel
{
id
:
helpText
width
:
parent
.
width
-
applyButton
.
width
-
5
text
:
"
Please select your airframe type. Click 'Apply and Restart' to reboot the autopilot. Please re-connect then manually.
"
text
:
"
You've connected a
"
+
controller
.
currentVehicleName
+
"
. If you’d like to change this configuration, select the desired airframe below then click “Apply and Restart”.
"
font.weight
:
Font
.
DemiBold
wrapMode
:
Text
.
WordWrap
}
...
...
@@ -177,78 +178,79 @@ QGCView {
// Outer summary item rectangle
Rectangle
{
id
:
airframeBackground
width
:
_boxWidth
height
:
ScreenTools
.
defaultFontPixelHeight
*
14
color
:
(
modelData
.
name
!=
controller
.
currentAirframeType
)
?
qgcPal
.
windowShade
:
qgcPal
.
buttonHighlight
color
:
qgcPal
.
window
readonly
property
real
titleHeight
:
ScreenTools
.
defaultFontPixelHeight
*
1.75
readonly
property
real
innerMargin
:
ScreenTools
.
defaultFontPixelWidth
MouseArea
{
anchors.fill
:
parent
onClicked
:
airframeCheckBox
.
checked
=
true
anchors.fill
:
parent
onClicked
:
{
applyButton
.
primary
=
true
airframeCheckBox
.
checked
=
true
}
}
Rectangle
{
QGCLabel
{
id
:
title
width
:
parent
.
width
height
:
parent
.
titleHeight
color
:
qgcPal
.
windowShadeDark
QGCLabel
{
anchors.fill
:
parent
color
:
qgcPal
.
buttonText
verticalAlignment
:
TextEdit
.
AlignVCenter
horizontalAlignment
:
TextEdit
.
AlignHCenter
text
:
modelData
.
name
}
text
:
modelData
.
name
}
Image
{
id
:
image
anchors.topMargin
:
innerMargin
Rectangle
{
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.top
:
title
.
bottom
width
:
parent
.
width
*
0.75
height
:
parent
.
height
-
title
.
height
-
combo
.
height
-
(
innerMargin
*
3
)
fillMode
:
Image
.
PreserveAspectFit
smooth
:
true
mipmap
:
true
source
:
modelData
.
imageResource
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
color
:
airframeCheckBox
.
checked
?
qgcPal
.
buttonHighlight
:
qgcPal
.
windowShade
Image
{
id
:
image
anchors.margins
:
innerMargin
anchors.top
:
parent
.
top
anchors.bottom
:
combo
.
top
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
fillMode
:
Image
.
PreserveAspectFit
smooth
:
true
mipmap
:
true
source
:
modelData
.
imageResource
}
QGCCheckBox
{
id
:
airframeCheckBox
checked
:
modelData
.
name
==
controller
.
currentAirframeType
exclusiveGroup
:
airframeTypeExclusive
anchors.bottom
:
image
.
bottom
anchors.right
:
parent
.
right
anchors.rightMargin
:
innerMargin
onCheckedChanged
:
{
if
(
checked
&&
combo
.
currentIndex
!=
-
1
)
{
controller
.
autostartId
=
modelData
.
airframes
[
combo
.
currentIndex
].
autostartId
airframeBackground
.
color
=
qgcPal
.
buttonHighlight
;
}
else
{
airframeBackground
.
color
=
qgcPal
.
windowShade
;
QGCCheckBox
{
// Although this item is invisible we still use it to manage state
id
:
airframeCheckBox
checked
:
modelData
.
name
==
controller
.
currentAirframeType
exclusiveGroup
:
airframeTypeExclusive
visible
:
false
onCheckedChanged
:
{
if
(
checked
&&
combo
.
currentIndex
!=
-
1
)
{
controller
.
autostartId
=
modelData
.
airframes
[
combo
.
currentIndex
].
autostartId
}
}
}
}
QGCComboBox
{
id
:
combo
objectName
:
modelData
.
airframeType
+
"
ComboBox
"
x
:
innerMargin
anchors.topMargin
:
innerMargin
anchors.top
:
image
.
bottom
width
:
parent
.
width
-
(
innerMargin
*
2
)
currentIndex
:
(
modelData
.
name
==
controller
.
currentAirframeType
)
?
controller
.
currentVehicleIndex
:
-
1
model
:
modelData
.
airframes
onActivated
:
{
if
(
index
!=
-
1
)
{
currentIndex
=
index
QGCComboBox
{
id
:
combo
objectName
:
modelData
.
airframeType
+
"
ComboBox
"
anchors.margins
:
innerMargin
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
model
:
modelData
.
airframes
Component.onCompleted
:
{
if
(
airframeCheckBox
.
checked
)
{
currentIndex
=
controller
.
currentVehicleIndex
}
}
onActivated
:
{
applyButton
.
primary
=
true
controller
.
autostartId
=
modelData
.
airframes
[
index
].
autostartId
airframeCheckBox
.
checked
=
true
;
}
...
...
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