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
f4b237b7
Commit
f4b237b7
authored
Dec 14, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flickable works, better real estate usage
parent
fc853305
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
111 additions
and
99 deletions
+111
-99
APMFlightModesComponent.qml
src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
+111
-99
No files found.
src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
View file @
f4b237b7
...
@@ -35,6 +35,8 @@ QGCView {
...
@@ -35,6 +35,8 @@ QGCView {
id
:
rootQGCView
id
:
rootQGCView
viewPanel
:
panel
viewPanel
:
panel
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
APMFlightModesComponentController
{
APMFlightModesComponentController
{
...
@@ -47,107 +49,117 @@ QGCView {
...
@@ -47,107 +49,117 @@ QGCView {
anchors.fill
:
parent
anchors.fill
:
parent
Flickable
{
Flickable
{
anchors.fill
:
parent
anchors.fill
:
parent
clip
:
true
Column
{
boundsBehavior
:
Flickable
.
StopAtBounds
width
:
parent
.
width
flickableDirection
:
Flickable
.
VerticalFlick
spacing
:
ScreenTools
.
defaultFontPixelHeight
contentHeight
:
flightModeSettings
.
y
+
flightModeSettings
.
height
QGCLabel
{
QGCLabel
{
text
:
"
Channel 5 Flight Mode Settings
"
id
:
flightModeLabel
font.weight
:
Font
.
DemiBold
text
:
"
Channel 5 Flight Mode Settings
"
}
font.weight
:
Font
.
DemiBold
}
Rectangle
{
width
:
parent
.
width
Rectangle
{
height
:
flightModeColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
id
:
flightModeSettings
color
:
qgcPal
.
windowShade
anchors.topMargin
:
_margins
anchors.top
:
flightModeLabel
.
bottom
Column
{
width
:
flightModeColumn
.
width
+
(
_margins
*
2
)
id
:
flightModeColumn
height
:
flightModeColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
color
:
qgcPal
.
windowShade
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
Column
{
anchors.top
:
parent
.
top
id
:
flightModeColumn
spacing
:
ScreenTools
.
defaultFontPixelHeight
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
Repeater
{
// anchors.right: parent.right
model
:
6
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelHeight
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
Repeater
{
model
:
6
property
int
index
:
modelData
+
1
property
var
pwmStrings
:
[
"
PWM 0 - 1230
"
,
"
PWM 1231 - 1360
"
,
"
PWM 1361 - 1490
"
,
"
PWM 1491 - 1620
"
,
"
PWM 1621 - 1749
"
,
"
PWM 1750 +
"
]
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
property
int
index
:
modelData
+
1
anchors.baseline
:
modeCombo
.
baseline
property
var
pwmStrings
:
[
"
PWM 0 - 1230
"
,
"
PWM 1231 - 1360
"
,
"
PWM 1361 - 1490
"
,
"
PWM 1491 - 1620
"
,
"
PWM 1621 - 1749
"
,
"
PWM 1750 +
"
]
text
:
"
Flight Mode
"
+
index
+
"
:
"
color
:
controller
.
activeFlightMode
==
index
?
qgcPal
.
buttonHighlight
:
qgcPal
.
text
}
QGCLabel
{
anchors.baseline
:
modeCombo
.
baseline
FactComboBox
{
text
:
"
Flight Mode
"
+
index
+
"
:
"
id
:
modeCombo
color
:
controller
.
activeFlightMode
==
index
?
qgcPal
.
buttonHighlight
:
qgcPal
.
text
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
}
fact
:
controller
.
getParameterFact
(
-
1
,
"
FLTMODE
"
+
index
)
indexModel
:
false
FactComboBox
{
}
id
:
modeCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
QGCLabel
{
fact
:
controller
.
getParameterFact
(
-
1
,
"
FLTMODE
"
+
index
)
anchors.baseline
:
modeCombo
.
baseline
indexModel
:
false
text
:
pwmStrings
[
modelData
]
}
}
}
}
// Repeater - Flight Modes
}
// Column - Flight Modes
QGCLabel
{
}
// Rectangle - Flight Modes
anchors.baseline
:
modeCombo
.
baseline
text
:
pwmStrings
[
modelData
]
QGCLabel
{
}
text
:
"
Channel Options
"
}
font.weight
:
Font
.
DemiBold
}
// Repeater - Flight Modes
}
}
// Column - Flight Modes
}
// Rectangle - Flight Modes
Rectangle
{
width
:
parent
.
width
QGCLabel
{
height
:
channelOptColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
id
:
channelOptionsLabel
color
:
qgcPal
.
windowShade
anchors.leftMargin
:
_margins
anchors.top
:
parent
.
top
Column
{
anchors.left
:
flightModeSettings
.
right
id
:
channelOptColumn
text
:
"
Channel Options
"
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
font.weight
:
Font
.
DemiBold
anchors.left
:
parent
.
left
}
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
Rectangle
{
spacing
:
ScreenTools
.
defaultFontPixelHeight
id
:
channelOptionsSettings
anchors.topMargin
:
_margins
Repeater
{
anchors.top
:
channelOptionsLabel
.
bottom
model
:
6
anchors.left
:
channelOptionsLabel
.
left
width
:
channelOptColumn
.
width
+
(
_margins
*
2
)
Row
{
height
:
channelOptColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
spacing
:
ScreenTools
.
defaultFontPixelWidth
color
:
qgcPal
.
windowShade
property
int
index
:
modelData
+
7
Column
{
id
:
channelOptColumn
QGCLabel
{
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.baseline
:
optCombo
.
baseline
anchors.left
:
parent
.
left
text
:
"
Channel option
"
+
index
+
"
:
"
anchors.top
:
parent
.
top
color
:
controller
.
channelOptionEnabled
[
modelData
]
?
qgcPal
.
buttonHighlight
:
qgcPal
.
text
spacing
:
ScreenTools
.
defaultFontPixelHeight
Component.onCompleted
:
console
.
log
(
index
,
controller
.
channelOptionEnabled
[
modelData
])
Repeater
{
}
model
:
6
FactComboBox
{
Row
{
id
:
optCombo
spacing
:
ScreenTools
.
defaultFontPixelWidth
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
controller
.
getParameterFact
(
-
1
,
"
CH
"
+
index
+
"
_OPT
"
)
property
int
index
:
modelData
+
7
indexModel
:
false
}
QGCLabel
{
anchors.baseline
:
optCombo
.
baseline
text
:
"
Channel option
"
+
index
+
"
:
"
color
:
controller
.
channelOptionEnabled
[
modelData
]
?
qgcPal
.
buttonHighlight
:
qgcPal
.
text
Component.onCompleted
:
console
.
log
(
index
,
controller
.
channelOptionEnabled
[
modelData
])
}
FactComboBox
{
id
:
optCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
controller
.
getParameterFact
(
-
1
,
"
CH
"
+
index
+
"
_OPT
"
)
indexModel
:
false
}
}
}
// Repeater -- Channel options
}
}
//
Column
- Channel options
}
//
Repeater -
- Channel options
}
//
Rectangle
- Channel options
}
//
Column
- Channel options
}
//
Column
}
//
Rectangle - Channel options
}
// FLickable
}
// FLickable
}
// QGCViewPanel
}
// QGCViewPanel
}
// QGCView
}
// QGCView
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