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
2b797d29
Commit
2b797d29
authored
Mar 29, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sizing/layout to work on all screen sizes
Also made combo box widths larger to accommodate text
parent
9f826f24
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
168 additions
and
199 deletions
+168
-199
CameraComponent.qml
src/AutoPilotPlugins/PX4/CameraComponent.qml
+168
-199
No files found.
src/AutoPilotPlugins/PX4/CameraComponent.qml
View file @
2b797d29
...
...
@@ -20,7 +20,6 @@ import QGroundControl.FactControls 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
SetupPage
{
id
:
cameraPage
pageComponent
:
pageComponent
...
...
@@ -28,14 +27,14 @@ SetupPage {
Component
{
id
:
pageComponent
Column
{
width
:
availableWidth
Item
{
width
:
Math
.
max
(
availableWidth
,
innerColumn
.
width
)
height
:
innerColumn
.
height
FactPanelController
{
id
:
controller
;
factPanel
:
cameraPage
.
viewPanel
}
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
property
real
_middleRowWidth
:
ScreenTools
.
defaultFontPixelWidth
*
16
property
real
_editFieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
16
property
real
_editFieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
25
property
Fact
_camTriggerMode
:
controller
.
getParameterFact
(
-
1
,
"
TRIG_MODE
"
)
property
Fact
_camTriggerInterface
:
controller
.
getParameterFact
(
-
1
,
"
TRIG_INTERFACE
"
,
false
)
...
...
@@ -76,21 +75,19 @@ SetupPage {
}
}
Item
{
ColumnLayout
{
id
:
innerColumn
anchors.horizontalCenter
:
parent
.
horizontalCenter
RowLayout
{
id
:
applyAndRestart
spacing
:
_margins
visible
:
false
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
10
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
*
10
height
:
applyButton
.
height
QGCLabel
{
anchors.left
:
parent
.
left
text
:
qsTr
(
"
Vehicle must be restarted for changes to take effect.
"
)
text
:
qsTr
(
"
Vehicle must be restarted for changes to take effect.
"
)
}
QGCButton
{
id
:
applyButton
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Apply and Restart
"
)
onClicked
:
{
//-- This will reboot the vehicle! We're set not to allow changes if armed.
...
...
@@ -101,28 +98,18 @@ SetupPage {
}
}
Column
{
id
:
mainCol
spacing
:
_margins
anchors.horizontalCenter
:
parent
.
horizontalCenter
/*
**** Camera Trigger ****
*/
QGCLabel
{
text
:
qsTr
(
"
Camera Trigger Settings
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
}
Rectangle
{
id
:
camTrigRect
color
:
qgcPal
.
windowShade
width
:
camTrigRow
.
width
+
_margins
*
2
height
:
camTrigRow
.
height
+
_margins
*
2
Row
{
id
:
camTrigRow
spacing
:
_margins
anchors.verticalCenter
:
parent
.
verticalCenter
Item
{
width
:
_margins
*
0.5
;
height
:
1
;
}
QGCGroupBox
{
title
:
qsTr
(
"
Camera Trigger Settings
"
)
Layout.fillWidth
:
true
GridLayout
{
id
:
cameraTrggerGrid
rows
:
4
columns
:
3
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
QGCColoredImage
{
id
:
triggerImage
color
:
qgcPal
.
text
height
:
ScreenTools
.
defaultFontPixelWidth
*
10
width
:
ScreenTools
.
defaultFontPixelWidth
*
20
...
...
@@ -130,51 +117,41 @@ SetupPage {
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
source
:
"
/qmlimages/CameraTrigger.svg
"
anchors.verticalCenter
:
parent
.
verticalCenter
Layout.rowSpan
:
4
}
Item
{
width
:
_margins
*
0.5
;
height
:
1
;
}
Column
{
spacing
:
_margins
*
0.5
anchors.verticalCenter
:
parent
.
verticalCenter
Row
{
QGCLabel
{
anchors.baseline
:
camTrigCombo
.
baseline
width
:
_middleRowWidth
text
:
qsTr
(
"
Trigger mode:
"
)
text
:
qsTr
(
"
Trigger mode
"
)
}
FactComboBox
{
id
:
camTrigCombo
width
:
_editFieldWidth
fact
:
_camTriggerMode
indexModel
:
false
enabled
:
!
_rebooting
Layout.minimumWidth
:
_editFieldWidth
onActivated
:
{
applyAndRestart
.
visible
=
true
}
}
}
Row
{
visible
:
_camTriggerInterface
?
true
:
false
QGCLabel
{
anchors.baseline
:
camInterfaceCombo
.
baseline
width
:
_middleRowWidth
text
:
qsTr
(
"
Trigger interface:
"
)
text
:
qsTr
(
"
Trigger interface
"
)
}
FactComboBox
{
id
:
camInterfaceCombo
width
:
_editFieldWidth
fact
:
_camTriggerInterface
indexModel
:
false
enabled
:
!
_rebooting
enabled
:
!
_rebooting
&&
(
_camTriggerInterface
?
true
:
false
)
Layout.minimumWidth
:
_editFieldWidth
onActivated
:
{
applyAndRestart
.
visible
=
true
}
}
}
Row
{
QGCLabel
{
text
:
qsTr
(
"
Time Interval
"
)
width
:
_middleRowWidth
anchors.baseline
:
timeIntervalField
.
baseline
color
:
qgcPal
.
text
}
...
...
@@ -182,14 +159,12 @@ SetupPage {
id
:
timeIntervalField
fact
:
controller
.
getParameterFact
(
-
1
,
"
TRIG_INTERVAL
"
,
false
)
showUnits
:
true
width
:
_editFieldWidth
enabled
:
_auxPins
&&
_camTriggerMode
.
value
===
2
}
Layout.minimumWidth
:
_editFieldWidth
enabled
:
_camTriggerMode
.
value
===
2
}
Row
{
QGCLabel
{
text
:
qsTr
(
"
Distance Interval
"
)
width
:
_middleRowWidth
anchors.baseline
:
trigDistField
.
baseline
color
:
qgcPal
.
text
}
...
...
@@ -197,54 +172,49 @@ SetupPage {
id
:
trigDistField
fact
:
controller
.
getParameterFact
(
-
1
,
"
TRIG_DISTANCE
"
,
false
)
showUnits
:
true
width
:
_editFieldWidth
enabled
:
_auxPins
&&
_camTriggerMode
.
value
===
3
}
}
}
Layout.minimumWidth
:
_editFieldWidth
enabled
:
_camTriggerMode
.
value
===
3
}
}
/*
**** Camera Hardware ****
*/
Item
{
width
:
1
;
height
:
_margins
*
0.5
;
}
QGCLabel
{
text
:
qsTr
(
"
Hardware Settings
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
visible
:
_auxPins
}
Rectangle
{
color
:
qgcPal
.
windowShade
width
:
camTrigRect
.
width
height
:
camHardwareRow
.
height
+
_margins
*
2
}
// QGCGroupBox - Camera Trigger
QGCGroupBox
{
title
:
qsTr
(
"
Hardware Settings
"
)
visible
:
_auxPins
Row
{
id
:
camHardwareRow
Layout.fillWidth
:
true
RowLayout
{
spacing
:
_margins
anchors.verticalCenter
:
parent
.
verticalCenter
Item
{
width
:
_margins
*
0.5
;
height
:
1
;
}
Item
{
height
:
ScreenTools
.
defaultFontPixelWidth
*
10
width
:
ScreenTools
.
defaultFontPixelWidth
*
20
Column
{
spacing
:
ScreenTools
.
defaultFontPixelHeight
anchors.centerIn
:
parent
// Aux pin assignment
ColumnLayout
{
spacing
:
_margins
QGCLabel
{
text
:
"
AUX Pin Assignment
"
anchors.horizontalCenter
:
parent
.
horizontalCenter
horizontalAlignment
:
Text
.
AlignHCenter
text
:
qsTr
(
"
AUX Pin Assignment
"
)
Layout.minimumWidth
:
triggerImage
.
width
}
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
_margins
anchors.horizontalCenter
:
parent
.
horizontalCenter
GridLayout
{
rows
:
2
columns
:
6
Repeater
{
model
:
_auxChannels
Column
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
QGCLabel
{
horizontalAlignment
:
Text
.
AlignHCenter
text
:
model
.
index
+
1
color
:
qgcPal
.
text
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
Repeater
{
model
:
_auxChannels
Rectangle
{
id
:
auxPin
width
:
ScreenTools
.
defaultFontPixelWidth
*
2
...
...
@@ -274,17 +244,15 @@ SetupPage {
}
}
}
}
}
Item
{
width
:
_margins
*
0.5
;
height
:
1
;
}
Column
{
}
// ColumnLayout - Aux pins
// Trigger Pin Setup
Column
Layout
{
visible
:
!
_camTriggerInterface
||
(
_camTriggerInterface
.
value
===
1
)
spacing
:
_margins
*
0.5
anchors.verticalCenter
:
parent
.
verticalCenter
QGCLabel
{
id
:
returnHomeLabel
text
:
"
Trigger Pin Polarity:
"
}
QGCLabel
{
text
:
qsTr
(
"
Trigger Pin Polarity
"
)
}
Row
{
Item
{
height
:
1
;
width
:
_margins
;
}
Column
{
...
...
@@ -312,11 +280,12 @@ SetupPage {
}
}
}
Item
{
width
:
1
;
height
:
_margins
*
0.5
;
}
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
qsTr
(
"
Trigger Period
"
)
width
:
_middleRowWidth
anchors.baseline
:
trigPeriodField
.
baseline
color
:
qgcPal
.
text
}
...
...
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