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
f7071dfd
Commit
f7071dfd
authored
Jan 03, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Standard sizing for QGCView::showDialog
parent
05092fe2
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
45 additions
and
41 deletions
+45
-41
APMAirframeComponent.qml
src/AutoPilotPlugins/APM/APMAirframeComponent.qml
+1
-1
APMSensorsComponent.qml
src/AutoPilotPlugins/APM/APMSensorsComponent.qml
+4
-4
RadioComponent.qml
src/AutoPilotPlugins/Common/RadioComponent.qml
+16
-16
AirframeComponent.qml
src/AutoPilotPlugins/PX4/AirframeComponent.qml
+2
-2
FlightModesComponent.qml
src/AutoPilotPlugins/PX4/FlightModesComponent.qml
+2
-2
SensorsComponent.qml
src/AutoPilotPlugins/PX4/SensorsComponent.qml
+7
-7
FactTextField.qml
src/FactSystem/FactControls/FactTextField.qml
+1
-1
MissionItemEditor.qml
src/QmlControls/MissionItemEditor.qml
+2
-2
ParameterEditor.qml
src/QmlControls/ParameterEditor.qml
+2
-2
QGCView.qml
src/QmlControls/QGCView.qml
+7
-3
FirmwareUpgrade.qml
src/VehicleSetup/FirmwareUpgrade.qml
+1
-1
No files found.
src/AutoPilotPlugins/APM/APMAirframeComponent.qml
View file @
f7071dfd
...
...
@@ -127,7 +127,7 @@ QGCView {
id
:
applyButton
anchors.right
:
parent
.
right
text
:
"
Load common parameters
"
onClicked
:
showDialog
(
applyRestartDialogComponent
,
qsTr
(
"
Load common parameters
"
),
50
,
StandardButton
.
Close
)
onClicked
:
showDialog
(
applyRestartDialogComponent
,
"
Load common parameters
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Close
)
}
}
...
...
src/AutoPilotPlugins/APM/APMSensorsComponent.qml
View file @
f7071dfd
...
...
@@ -34,7 +34,7 @@ import QGroundControl.ScreenTools 1.0
import
QGroundControl
.
Controllers
1.0
QGCView
{
id
:
rootQGC
View
id
:
qgc
View
viewPanel
:
panel
// Help text which is shown both in the status text area prior to pressing a cal button and in the
...
...
@@ -157,7 +157,7 @@ QGCView {
_postCalibrationDialogParams
.
push
(
"
COMPASS_OFS3_Z
"
)
}
}
showDialog
(
postCalibrationDialogComponent
,
"
Calibration complete
"
,
50
,
StandardButton
.
Ok
)
showDialog
(
postCalibrationDialogComponent
,
"
Calibration complete
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Ok
)
}
}
...
...
@@ -362,7 +362,7 @@ QGCView {
}
else
{
preCalibrationDialogType
=
"
compass
"
preCalibrationDialogHelp
=
compassHelp
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Compass
"
,
50
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Compass
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
}
...
...
@@ -376,7 +376,7 @@ QGCView {
onClicked
:
{
preCalibrationDialogType
=
"
accel
"
preCalibrationDialogHelp
=
accelHelp
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Accelerometer
"
,
50
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Accelerometer
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
QGCButton
{
...
...
src/AutoPilotPlugins/Common/RadioComponent.qml
View file @
f7071dfd
...
...
@@ -34,7 +34,7 @@ import QGroundControl.ScreenTools 1.0
import
QGroundControl
.
Controllers
1.0
QGCView
{
id
:
rootQGC
View
id
:
qgc
View
viewPanel
:
panel
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
...
...
@@ -51,7 +51,7 @@ QGCView {
FIXME: Turned off for now, since it prevents binding. Need to restructure to
allow binding and still check channel count
if (controller.channelCount < controller.minChannelCount) {
showDialog(channelCountDialogComponent, dialogTitle,
50
, 0)
showDialog(channelCountDialogComponent, dialogTitle,
qgcView.showDialogDefaultWidth
, 0)
} else {
hideDialog()
}
...
...
@@ -68,7 +68,7 @@ QGCView {
Component.onCompleted
:
{
controllerCompleted
=
true
if
(
rootQGC
View
.
completedSignalled
)
{
if
(
qgc
View
.
completedSignalled
)
{
controllerAndViewReady
=
true
controller
.
start
()
updateChannelCount
()
...
...
@@ -283,11 +283,11 @@ QGCView {
id
:
rollLoader
anchors.left
:
rollLabel
.
right
anchors.right
:
parent
.
right
height
:
rootQGC
View
.
defaultTextHeight
height
:
qgc
View
.
defaultTextHeight
width
:
100
sourceComponent
:
channelMonitorDisplayComponent
property
real
defaultTextWidth
:
rootQGC
View
.
defaultTextWidth
property
real
defaultTextWidth
:
qgc
View
.
defaultTextWidth
property
bool
mapped
:
controller
.
rollChannelMapped
property
bool
reversed
:
controller
.
rollChannelReversed
}
...
...
@@ -313,11 +313,11 @@ QGCView {
id
:
pitchLoader
anchors.left
:
pitchLabel
.
right
anchors.right
:
parent
.
right
height
:
rootQGC
View
.
defaultTextHeight
height
:
qgc
View
.
defaultTextHeight
width
:
100
sourceComponent
:
channelMonitorDisplayComponent
property
real
defaultTextWidth
:
rootQGC
View
.
defaultTextWidth
property
real
defaultTextWidth
:
qgc
View
.
defaultTextWidth
property
bool
mapped
:
controller
.
pitchChannelMapped
property
bool
reversed
:
controller
.
pitchChannelReversed
}
...
...
@@ -343,11 +343,11 @@ QGCView {
id
:
yawLoader
anchors.left
:
yawLabel
.
right
anchors.right
:
parent
.
right
height
:
rootQGC
View
.
defaultTextHeight
height
:
qgc
View
.
defaultTextHeight
width
:
100
sourceComponent
:
channelMonitorDisplayComponent
property
real
defaultTextWidth
:
rootQGC
View
.
defaultTextWidth
property
real
defaultTextWidth
:
qgc
View
.
defaultTextWidth
property
bool
mapped
:
controller
.
yawChannelMapped
property
bool
reversed
:
controller
.
yawChannelReversed
}
...
...
@@ -373,11 +373,11 @@ QGCView {
id
:
throttleLoader
anchors.left
:
throttleLabel
.
right
anchors.right
:
parent
.
right
height
:
rootQGC
View
.
defaultTextHeight
height
:
qgc
View
.
defaultTextHeight
width
:
100
sourceComponent
:
channelMonitorDisplayComponent
property
real
defaultTextWidth
:
rootQGC
View
.
defaultTextWidth
property
real
defaultTextWidth
:
qgc
View
.
defaultTextWidth
property
bool
mapped
:
controller
.
throttleChannelMapped
property
bool
reversed
:
controller
.
throttleChannelReversed
}
...
...
@@ -418,7 +418,7 @@ QGCView {
onClicked
:
{
if
(
text
==
"
Calibrate
"
)
{
showDialog
(
zeroTrimsDialogComponent
,
dialogTitle
,
50
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
showDialog
(
zeroTrimsDialogComponent
,
dialogTitle
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
else
{
controller
.
nextButtonClicked
()
}
...
...
@@ -460,7 +460,7 @@ QGCView {
showBorder
:
true
text
:
"
Spektrum Bind
"
onClicked
:
showDialog
(
spektrumBindDialogComponent
,
dialogTitle
,
50
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
onClicked
:
showDialog
(
spektrumBindDialogComponent
,
dialogTitle
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
...
...
@@ -468,7 +468,7 @@ QGCView {
showBorder
:
true
text
:
"
Copy Trims
"
visible
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
px4Firmware
onClicked
:
showDialog
(
copyTrimsDialogComponent
,
dialogTitle
,
50
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
onClicked
:
showDialog
(
copyTrimsDialogComponent
,
dialogTitle
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
// Column - Left Column
...
...
@@ -552,11 +552,11 @@ QGCView {
Loader
{
id
:
theLoader
anchors.verticalCenter
:
channelLabel
.
verticalCenter
height
:
rootQGC
View
.
defaultTextHeight
height
:
qgc
View
.
defaultTextHeight
width
:
200
sourceComponent
:
channelMonitorDisplayComponent
property
real
defaultTextWidth
:
rootQGC
View
.
defaultTextWidth
property
real
defaultTextWidth
:
qgc
View
.
defaultTextWidth
property
bool
mapped
:
true
readonly
property
bool
reversed
:
false
}
...
...
src/AutoPilotPlugins/PX4/AirframeComponent.qml
View file @
f7071dfd
...
...
@@ -67,7 +67,7 @@ QGCView {
Component.onCompleted
:
{
if
(
controller
.
showCustomConfigPanel
)
{
showDialog
(
customConfigDialogComponent
,
"
Custom Airframe Config
"
,
50
,
StandardButton
.
Reset
)
showDialog
(
customConfigDialogComponent
,
"
Custom Airframe Config
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Reset
)
}
}
}
...
...
@@ -138,7 +138,7 @@ QGCView {
anchors.right
:
parent
.
right
text
:
"
Apply and Restart
"
onClicked
:
showDialog
(
applyRestartDialogComponent
,
"
Apply and Restart
"
,
50
,
StandardButton
.
Apply
|
StandardButton
.
Cancel
)
onClicked
:
showDialog
(
applyRestartDialogComponent
,
"
Apply and Restart
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Apply
|
StandardButton
.
Cancel
)
}
}
...
...
src/AutoPilotPlugins/PX4/FlightModesComponent.qml
View file @
f7071dfd
...
...
@@ -35,7 +35,7 @@ import QGroundControl.Controllers 1.0
import
QGroundControl
.
ScreenTools
1.0
QGCView
{
id
:
rootQGC
View
id
:
qgc
View
viewPanel
:
panel
readonly
property
int
monitorThresholdCharWidth
:
8
// Character width of Monitor and Threshold labels
...
...
@@ -138,7 +138,7 @@ QGCView {
onTriggered
:
{
recalcModePositions
()
if
(
rcInMode
.
value
==
1
)
{
showDialog
(
joystickEnabledDialogComponent
,
title
,
50
,
0
)
showDialog
(
joystickEnabledDialogComponent
,
title
,
qgcView
.
showDialogDefaultWidth
,
0
)
}
}
}
...
...
src/AutoPilotPlugins/PX4/SensorsComponent.qml
View file @
f7071dfd
...
...
@@ -34,7 +34,7 @@ import QGroundControl.ScreenTools 1.0
import
QGroundControl
.
Controllers
1.0
QGCView
{
id
:
rootQGC
View
id
:
qgc
View
viewPanel
:
panel
// Help text which is shown both in the status text area prior to pressing a cal button and in the
...
...
@@ -130,7 +130,7 @@ QGCView {
onSetCompassRotations
:
{
if
(
showCompass0Rot
||
showCompass1Rot
||
showCompass2Rot
)
{
showDialog
(
compassRotationDialogComponent
,
"
Set Compass Rotation(s)
"
,
50
,
StandardButton
.
Ok
)
showDialog
(
compassRotationDialogComponent
,
"
Set Compass Rotation(s)
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Ok
)
}
}
...
...
@@ -295,7 +295,7 @@ QGCView {
onClicked
:
{
preCalibrationDialogType
=
"
compass
"
preCalibrationDialogHelp
=
compassHelp
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Compass
"
,
50
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Compass
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
...
...
@@ -308,7 +308,7 @@ QGCView {
onClicked
:
{
preCalibrationDialogType
=
"
gyro
"
preCalibrationDialogHelp
=
gyroHelp
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Gyro
"
,
50
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Gyro
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
...
...
@@ -321,7 +321,7 @@ QGCView {
onClicked
:
{
preCalibrationDialogType
=
"
accel
"
preCalibrationDialogHelp
=
accelHelp
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Accelerometer
"
,
50
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Accelerometer
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
...
...
@@ -335,7 +335,7 @@ QGCView {
onClicked
:
{
preCalibrationDialogType
=
"
level
"
preCalibrationDialogHelp
=
levelHelp
showDialog
(
preCalibrationDialogComponent
,
"
Level Horizon
"
,
50
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
showDialog
(
preCalibrationDialogComponent
,
"
Level Horizon
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
...
...
@@ -349,7 +349,7 @@ QGCView {
onClicked
:
{
preCalibrationDialogType
=
"
airspeed
"
preCalibrationDialogHelp
=
airspeedHelp
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Airspeed
"
,
50
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
showDialog
(
preCalibrationDialogComponent
,
"
Calibrate Airspeed
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
...
...
src/FactSystem/FactControls/FactTextField.qml
View file @
f7071dfd
...
...
@@ -29,7 +29,7 @@ QGCTextField {
fact
.
value
=
text
}
else
{
_validateString
=
text
qgcView
.
showDialog
(
editorDialogComponent
,
"
Invalid Parameter Value
"
,
50
,
StandardButton
.
Save
)
qgcView
.
showDialog
(
editorDialogComponent
,
"
Invalid Parameter Value
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Save
)
}
}
else
{
fact
.
value
=
text
...
...
src/QmlControls/MissionItemEditor.qml
View file @
f7071dfd
...
...
@@ -95,7 +95,7 @@ Rectangle {
MenuItem
{
text
:
"
Delete all
"
onTriggered
:
qgcView
.
showDialog
(
deleteAllPromptDialog
,
"
Delete all
"
,
40
,
StandardButton
.
Yes
|
StandardButton
.
No
)
onTriggered
:
qgcView
.
showDialog
(
deleteAllPromptDialog
,
"
Delete all
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Yes
|
StandardButton
.
No
)
}
MenuSeparator
{
}
...
...
@@ -139,7 +139,7 @@ Rectangle {
}
}
onClicked
:
qgcView
.
showDialog
(
commandDialog
,
"
Select Mission Command
"
,
40
,
StandardButton
.
Cancel
)
onClicked
:
qgcView
.
showDialog
(
commandDialog
,
"
Select Mission Command
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
)
}
QGCLabel
{
...
...
src/QmlControls/ParameterEditor.qml
View file @
f7071dfd
...
...
@@ -119,7 +119,7 @@ QGCView {
}
MenuItem
{
text
:
"
Search...
"
onTriggered
:
showDialog
(
searchDialogComponent
,
"
Parameter Search
"
,
50
,
StandardButton
.
Reset
|
StandardButton
.
Apply
)
onTriggered
:
showDialog
(
searchDialogComponent
,
"
Parameter Search
"
,
panel
.
showDialogDefaultWidth
,
StandardButton
.
Reset
|
StandardButton
.
Apply
)
}
MenuSeparator
{
visible
:
!
ScreenTools
.
isMobile
}
MenuItem
{
...
...
@@ -314,7 +314,7 @@ QGCView {
acceptedButtons
:
Qt
.
LeftButton
onClicked
:
{
__editorDialogFact
=
factRow
.
modelFact
showDialog
(
editorDialogComponent
,
"
Parameter Editor
"
,
50
,
StandardButton
.
Cancel
|
StandardButton
.
Save
)
showDialog
(
editorDialogComponent
,
"
Parameter Editor
"
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Save
)
}
}
}
...
...
src/QmlControls/QGCView.qml
View file @
f7071dfd
...
...
@@ -128,8 +128,12 @@ FactPanel {
/// Shows a QGCViewDialog component
/// @param compoent QGCViewDialog component
/// @param title Title for dialog
/// @param charWidth Width of dialog in characters
(-1 for full parent width)
/// @param charWidth Width of dialog in characters
/// @param buttons Buttons to show in dialog using StandardButton enum
readonly
property
int
showDialogFullWidth
:
-
1
///< Use for full width dialog
readonly
property
int
showDialogDefaultWidth
:
40
///< Use for default dialog width
function
showDialog
(
component
,
title
,
charWidth
,
buttons
)
{
if
(
__checkForEarlyDialog
(
title
))
{
return
...
...
@@ -158,7 +162,7 @@ FactPanel {
__stopAllAnimations
()
__dialogCharWidth
=
50
__dialogCharWidth
=
showDialogDefaultWidth
__dialogTitle
=
title
__messageDialogText
=
message
...
...
@@ -285,7 +289,7 @@ FactPanel {
// This is the main dialog panel which is anchored to the right edge
Rectangle
{
id
:
__dialogPanel
width
:
__dialogCharWidth
==
-
1
?
parent
.
width
:
defaultTextWidth
*
__dialogCharWidth
width
:
__dialogCharWidth
==
showDialogFullWidth
?
parent
.
width
:
defaultTextWidth
*
__dialogCharWidth
anchors.topMargin
:
topDialogMargin
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
...
...
src/VehicleSetup/FirmwareUpgrade.qml
View file @
f7071dfd
...
...
@@ -109,7 +109,7 @@ QGCView {
// We end up here when we detect a board plugged in after we've started upgrade
statusTextArea
.
append
(
highlightPrefix
+
"
Found device
"
+
highlightSuffix
+
"
:
"
+
controller
.
boardType
)
if
(
controller
.
boardType
==
"
Pixhawk
"
||
controller
.
boardType
==
"
AeroCore
"
||
controller
.
boardType
==
"
PX4 Flow
"
||
controller
.
boardType
==
"
PX4 FMU V1
"
)
{
showDialog
(
pixhawkFirmwareSelectDialog
,
title
,
50
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
showDialog
(
pixhawkFirmwareSelectDialog
,
title
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
}
...
...
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