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
299fde42
Unverified
Commit
299fde42
authored
Feb 21, 2018
by
Gus Grubba
Committed by
GitHub
Feb 21, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6152 from mavlink/qmlFixes
QML fixes
parents
61cc29df
0f944190
Changes
52
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
157 additions
and
151 deletions
+157
-151
GeoTagPage.qml
src/AnalyzeView/GeoTagPage.qml
+1
-1
MotorComponent.qml
src/AutoPilotPlugins/Common/MotorComponent.qml
+1
-1
RadioComponent.qml
src/AutoPilotPlugins/Common/RadioComponent.qml
+1
-1
AirframeComponent.qml
src/AutoPilotPlugins/PX4/AirframeComponent.qml
+2
-2
AirframeComponentSummary.qml
src/AutoPilotPlugins/PX4/AirframeComponentSummary.qml
+1
-1
FlightModesComponentSummary.qml
src/AutoPilotPlugins/PX4/FlightModesComponentSummary.qml
+1
-1
PX4FlightModes.qml
src/AutoPilotPlugins/PX4/PX4FlightModes.qml
+1
-1
PX4SimpleFlightModes.qml
src/AutoPilotPlugins/PX4/PX4SimpleFlightModes.qml
+4
-4
PowerComponent.qml
src/AutoPilotPlugins/PX4/PowerComponent.qml
+3
-3
SensorsComponentSummaryFixedWing.qml
...AutoPilotPlugins/PX4/SensorsComponentSummaryFixedWing.qml
+2
-2
SensorsSetup.qml
src/AutoPilotPlugins/PX4/SensorsSetup.qml
+8
-8
FactBitmask.qml
src/FactSystem/FactControls/FactBitmask.qml
+6
-4
FactCheckBox.qml
src/FactSystem/FactControls/FactCheckBox.qml
+3
-5
FactComboBox.qml
src/FactSystem/FactControls/FactComboBox.qml
+1
-1
FactTextField.qml
src/FactSystem/FactControls/FactTextField.qml
+1
-1
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+1
-1
FlightDisplayViewWidgets.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
+1
-1
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+8
-8
MultiVehicleList.qml
src/FlightDisplay/MultiVehicleList.qml
+3
-3
CustomMapItems.qml
src/FlightMap/MapItems/CustomMapItems.qml
+2
-2
PolygonEditor.qml
src/FlightMap/MapItems/PolygonEditor.qml
+3
-3
MapScale.qml
src/FlightMap/MapScale.qml
+1
-1
CenterMapDropButton.qml
src/FlightMap/Widgets/CenterMapDropButton.qml
+4
-3
MapFitFunctions.qml
src/FlightMap/Widgets/MapFitFunctions.qml
+4
-3
ValuePageWidget.qml
src/FlightMap/Widgets/ValuePageWidget.qml
+2
-2
CameraCalc.qml
src/PlanView/CameraCalc.qml
+1
-1
CameraSection.qml
src/PlanView/CameraSection.qml
+2
-2
GeoFenceEditor.qml
src/PlanView/GeoFenceEditor.qml
+2
-2
MissionItemEditor.qml
src/PlanView/MissionItemEditor.qml
+1
-1
PlanToolBar.qml
src/PlanView/PlanToolBar.qml
+3
-3
PlanView.qml
src/PlanView/PlanView.qml
+2
-2
RallyPointItemEditor.qml
src/PlanView/RallyPointItemEditor.qml
+1
-1
RallyPointMapVisuals.qml
src/PlanView/RallyPointMapVisuals.qml
+2
-2
SimpleItemEditor.qml
src/PlanView/SimpleItemEditor.qml
+1
-1
SurveyItemEditor.qml
src/PlanView/SurveyItemEditor.qml
+6
-6
SurveyMapVisual.qml
src/PlanView/SurveyMapVisual.qml
+1
-0
DropButton.qml
src/QmlControls/DropButton.qml
+3
-3
DropPanel.qml
src/QmlControls/DropPanel.qml
+3
-3
FlightModeMenu.qml
src/QmlControls/FlightModeMenu.qml
+3
-2
MissionCommandDialog.qml
src/QmlControls/MissionCommandDialog.qml
+1
-1
ParameterEditor.qml
src/QmlControls/ParameterEditor.qml
+1
-1
ParameterEditorDialog.qml
src/QmlControls/ParameterEditorDialog.qml
+2
-2
QGCFileDialog.qml
src/QmlControls/QGCFileDialog.qml
+1
-1
QGCFlickableHorizontalIndicator.qml
src/QmlControls/QGCFlickableHorizontalIndicator.qml
+3
-3
QGCFlickableVerticalIndicator.qml
src/QmlControls/QGCFlickableVerticalIndicator.qml
+3
-3
QGCPipable.qml
src/QmlControls/QGCPipable.qml
+3
-3
QGCView.qml
src/QmlControls/QGCView.qml
+1
-1
QGCViewDialog.qml
src/QmlControls/QGCViewDialog.qml
+2
-2
QmlTest.qml
src/QmlControls/QmlTest.qml
+35
-35
FirmwareUpgrade.qml
src/VehicleSetup/FirmwareUpgrade.qml
+3
-3
VehicleSummary.qml
src/VehicleSetup/VehicleSummary.qml
+2
-2
ViewWidget.qml
src/ViewWidgets/ViewWidget.qml
+4
-2
No files found.
src/AnalyzeView/GeoTagPage.qml
View file @
299fde42
...
...
@@ -110,7 +110,7 @@ AnalyzePage {
}
QGCLabel
{
text
:
geoController
.
saveDirectory
!=
""
?
geoController
.
saveDirectory
:
"
/TAGGED folder in your image folder
"
text
:
geoController
.
saveDirectory
!=
=
""
?
geoController
.
saveDirectory
:
"
/TAGGED folder in your image folder
"
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
...
src/AutoPilotPlugins/Common/MotorComponent.qml
View file @
299fde42
...
...
@@ -55,7 +55,7 @@ SetupPage {
property
real
_lastValue
:
0
onTriggered
:
{
if
(
_lastValue
!=
slider
.
value
)
{
if
(
_lastValue
!=
=
slider
.
value
)
{
controller
.
vehicle
.
motorTest
(
index
+
1
,
slider
.
value
,
1
)
}
}
...
...
src/AutoPilotPlugins/Common/RadioComponent.qml
View file @
299fde42
...
...
@@ -379,7 +379,7 @@ SetupPage {
text
:
qsTr
(
"
Calibrate
"
)
onClicked
:
{
if
(
text
==
qsTr
(
"
Calibrate
"
))
{
if
(
text
==
=
qsTr
(
"
Calibrate
"
))
{
showDialog
(
zeroTrimsDialogComponent
,
dialogTitle
,
radioPage
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
else
{
controller
.
nextButtonClicked
()
...
...
src/AutoPilotPlugins/PX4/AirframeComponent.qml
View file @
299fde42
...
...
@@ -202,12 +202,12 @@ Your vehicle will also be restarted in order to complete the process.")
QGCCheckBox
{
// Although this item is invisible we still use it to manage state
id
:
airframeCheckBox
checked
:
modelData
.
name
==
controller
.
currentAirframeType
checked
:
modelData
.
name
==
=
controller
.
currentAirframeType
exclusiveGroup
:
airframeTypeExclusive
visible
:
false
onCheckedChanged
:
{
if
(
checked
&&
combo
.
currentIndex
!=
-
1
)
{
if
(
checked
&&
combo
.
currentIndex
!=
=
-
1
)
{
console
.
log
(
"
check box change
"
,
combo
.
currentIndex
)
controller
.
autostartId
=
modelData
.
airframes
[
combo
.
currentIndex
].
autostartId
}
...
...
src/AutoPilotPlugins/PX4/AirframeComponentSummary.qml
View file @
299fde42
...
...
@@ -37,7 +37,7 @@ FactPanel {
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Firmware Version:
"
)
valueText
:
activeVehicle
.
firmwareMajorVersion
==
-
1
?
qsTr
(
"
Unknown
"
)
:
activeVehicle
.
firmwareMajorVersion
+
"
.
"
+
activeVehicle
.
firmwareMinorVersion
+
"
.
"
+
activeVehicle
.
firmwarePatchVersion
+
activeVehicle
.
firmwareVersionTypeString
valueText
:
activeVehicle
.
firmwareMajorVersion
==
=
-
1
?
qsTr
(
"
Unknown
"
)
:
activeVehicle
.
firmwareMajorVersion
+
"
.
"
+
activeVehicle
.
firmwareMinorVersion
+
"
.
"
+
activeVehicle
.
firmwarePatchVersion
+
activeVehicle
.
firmwareVersionTypeString
}
}
}
src/AutoPilotPlugins/PX4/FlightModesComponentSummary.qml
View file @
299fde42
...
...
@@ -18,7 +18,7 @@ FactPanel {
property
Fact
_nullFact
property
Fact
_rcMapFltmode
:
controller
.
parameterExists
(
-
1
,
"
RC_MAP_FLTMODE
"
)
?
controller
.
getParameterFact
(
-
1
,
"
RC_MAP_FLTMODE
"
)
:
_nullFact
property
Fact
_rcMapModeSw
:
controller
.
getParameterFact
(
-
1
,
"
RC_MAP_MODE_SW
"
)
property
bool
_simpleMode
:
_rcMapFltmode
.
value
>
0
||
_rcMapModeSw
.
value
==
0
property
bool
_simpleMode
:
_rcMapFltmode
.
value
>
0
||
_rcMapModeSw
.
value
==
=
0
Loader
{
anchors.fill
:
parent
...
...
src/AutoPilotPlugins/PX4/PX4FlightModes.qml
View file @
299fde42
...
...
@@ -39,7 +39,7 @@ SetupPage {
property
bool
_rcMapFltmodeExists
:
controller
.
parameterExists
(
-
1
,
"
RC_MAP_FLTMODE
"
)
property
Fact
_rcMapFltmode
:
_rcMapFltmodeExists
?
controller
.
getParameterFact
(
-
1
,
"
RC_MAP_FLTMODE
"
)
:
_nullFact
property
Fact
_rcMapModeSw
:
controller
.
getParameterFact
(
-
1
,
"
RC_MAP_MODE_SW
"
)
property
bool
_simpleMode
:
_rcMapFltmodeExists
?
_rcMapFltmode
.
value
>
0
||
_rcMapModeSw
.
value
==
0
:
false
property
bool
_simpleMode
:
_rcMapFltmodeExists
?
_rcMapFltmode
.
value
>
0
||
_rcMapModeSw
.
value
==
=
0
:
false
FactPanelController
{
id
:
controller
...
...
src/AutoPilotPlugins/PX4/PX4SimpleFlightModes.qml
View file @
299fde42
...
...
@@ -145,7 +145,7 @@ Item {
QGCLabel
{
anchors.baseline
:
returnCombo
.
baseline
text
:
qsTr
(
"
Return switch:
"
)
color
:
parent
.
fact
.
value
==
0
?
qgcPal
.
text
:
(
controller
.
rcChannelValues
[
parent
.
fact
.
value
-
1
]
>=
1500
?
"
yellow
"
:
qgcPal
.
text
)
color
:
parent
.
fact
.
value
==
=
0
?
qgcPal
.
text
:
(
controller
.
rcChannelValues
[
parent
.
fact
.
value
-
1
]
>=
1500
?
"
yellow
"
:
qgcPal
.
text
)
}
FactComboBox
{
...
...
@@ -164,7 +164,7 @@ Item {
QGCLabel
{
anchors.baseline
:
killCombo
.
baseline
text
:
qsTr
(
"
Kill switch:
"
)
color
:
parent
.
fact
.
value
==
0
?
qgcPal
.
text
:
(
controller
.
rcChannelValues
[
parent
.
fact
.
value
-
1
]
>=
1500
?
"
yellow
"
:
qgcPal
.
text
)
color
:
parent
.
fact
.
value
==
=
0
?
qgcPal
.
text
:
(
controller
.
rcChannelValues
[
parent
.
fact
.
value
-
1
]
>=
1500
?
"
yellow
"
:
qgcPal
.
text
)
}
FactComboBox
{
...
...
@@ -183,7 +183,7 @@ Item {
QGCLabel
{
anchors.baseline
:
offboardCombo
.
baseline
text
:
qsTr
(
"
Offboard switch:
"
)
color
:
parent
.
fact
.
value
==
0
?
qgcPal
.
text
:
(
controller
.
rcChannelValues
[
parent
.
fact
.
value
-
1
]
>=
1500
?
"
yellow
"
:
qgcPal
.
text
)
color
:
parent
.
fact
.
value
==
=
0
?
qgcPal
.
text
:
(
controller
.
rcChannelValues
[
parent
.
fact
.
value
-
1
]
>=
1500
?
"
yellow
"
:
qgcPal
.
text
)
}
FactComboBox
{
...
...
@@ -203,7 +203,7 @@ Item {
QGCLabel
{
anchors.baseline
:
vtolCombo
.
baseline
text
:
qsTr
(
"
VTOL mode switch:
"
)
color
:
parent
.
fact
.
value
==
0
?
qgcPal
.
text
:
(
controller
.
rcChannelValues
[
parent
.
fact
.
value
-
1
]
>=
1500
?
"
yellow
"
:
qgcPal
.
text
)
color
:
parent
.
fact
.
value
==
=
0
?
qgcPal
.
text
:
(
controller
.
rcChannelValues
[
parent
.
fact
.
value
-
1
]
>=
1500
?
"
yellow
"
:
qgcPal
.
text
)
}
FactComboBox
{
...
...
src/AutoPilotPlugins/PX4/PowerComponent.qml
View file @
299fde42
...
...
@@ -143,7 +143,7 @@ SetupPage {
onClicked
:
{
var
measuredVoltageValue
=
parseFloat
(
measuredVoltage
.
text
)
if
(
measuredVoltageValue
==
0
||
isNaN
(
measuredVoltageValue
))
{
if
(
measuredVoltageValue
==
=
0
||
isNaN
(
measuredVoltageValue
))
{
return
}
var
newVoltageDivider
=
(
measuredVoltageValue
*
battVoltageDivider
.
value
)
/
controller
.
vehicle
.
battery
.
voltage
.
value
...
...
@@ -201,7 +201,7 @@ SetupPage {
onClicked
:
{
var
measuredCurrentValue
=
parseFloat
(
measuredCurrent
.
text
)
if
(
measuredCurrentValue
==
0
)
{
if
(
measuredCurrentValue
==
=
0
)
{
return
}
var
newAmpsPerVolt
=
(
measuredCurrentValue
*
battAmpsPerVolt
.
value
)
/
controller
.
vehicle
.
battery
.
current
.
value
...
...
@@ -379,7 +379,7 @@ SetupPage {
QGCCheckBox
{
id
:
showUAVCAN
text
:
qsTr
(
"
Show UAVCAN Settings
"
)
checked
:
uavcanEnable
.
rawValue
!=
0
checked
:
uavcanEnable
?
uavcanEnable
.
rawValue
!==
0
:
false
}
QGCGroupBox
{
...
...
src/AutoPilotPlugins/PX4/SensorsComponentSummaryFixedWing.qml
View file @
299fde42
...
...
@@ -25,8 +25,8 @@ FactPanel {
property
Fact
airspeedDisabledFact
:
controller
.
getParameterFact
(
-
1
,
"
FW_ARSP_MODE
"
)
property
Fact
airspeedBreakerFact
:
controller
.
getParameterFact
(
-
1
,
"
CBRK_AIRSPD_CHK
"
)
property
bool
_airspeedVisible
:
airspeedDisabledFact
.
value
==
false
&&
airspeedBreakerFact
.
value
!
=
162128
property
bool
_airspeedCalRequired
:
_airspeedVisible
&&
dpressOffFact
.
value
==
0
property
bool
_airspeedVisible
:
airspeedDisabledFact
.
value
==
=
false
&&
airspeedBreakerFact
.
value
!=
=
162128
property
bool
_airspeedCalRequired
:
_airspeedVisible
&&
dpressOffFact
.
value
==
=
0
Column
{
anchors.fill
:
parent
...
...
src/AutoPilotPlugins/PX4/SensorsSetup.qml
View file @
299fde42
...
...
@@ -352,7 +352,7 @@ Item {
id
:
compassButton
width
:
_buttonWidth
text
:
qsTr
(
"
Compass
"
)
indicatorGreen
:
cal_mag0_id
.
value
!=
0
indicatorGreen
:
cal_mag0_id
.
value
!=
=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationCompass
&&
showSensorCalibrationCompass
onClicked
:
{
...
...
@@ -366,7 +366,7 @@ Item {
id
:
gyroButton
width
:
_buttonWidth
text
:
qsTr
(
"
Gyroscope
"
)
indicatorGreen
:
cal_gyro0_id
.
value
!=
0
indicatorGreen
:
cal_gyro0_id
.
value
!=
=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationGyro
&&
showSensorCalibrationGyro
onClicked
:
{
...
...
@@ -380,7 +380,7 @@ Item {
id
:
accelButton
width
:
_buttonWidth
text
:
qsTr
(
"
Accelerometer
"
)
indicatorGreen
:
cal_acc0_id
.
value
!=
0
indicatorGreen
:
cal_acc0_id
.
value
!=
=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationAccel
&&
showSensorCalibrationAccel
onClicked
:
{
...
...
@@ -394,8 +394,8 @@ Item {
id
:
levelButton
width
:
_buttonWidth
text
:
qsTr
(
"
Level Horizon
"
)
indicatorGreen
:
sens_board_x_off
.
value
!=
0
||
sens_board_y_off
.
value
!=
0
|
sens_board_z_off
.
value
!
=
0
enabled
:
cal_acc0_id
.
value
!=
0
&&
cal_gyro0_id
.
value
!
=
0
indicatorGreen
:
sens_board_x_off
.
value
!=
=
0
||
sens_board_y_off
.
value
!==
0
|
sens_board_z_off
.
value
!=
=
0
enabled
:
cal_acc0_id
.
value
!=
=
0
&&
cal_gyro0_id
.
value
!=
=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationLevel
&&
showSensorCalibrationLevel
onClicked
:
{
...
...
@@ -410,11 +410,11 @@ Item {
width
:
_buttonWidth
text
:
qsTr
(
"
Airspeed
"
)
visible
:
(
controller
.
vehicle
.
fixedWing
||
controller
.
vehicle
.
vtol
)
&&
controller
.
getParameterFact
(
-
1
,
"
FW_ARSP_MODE
"
).
value
==
false
&&
controller
.
getParameterFact
(
-
1
,
"
CBRK_AIRSPD_CHK
"
).
value
!=
162128
&&
controller
.
getParameterFact
(
-
1
,
"
FW_ARSP_MODE
"
).
value
==
=
false
&&
controller
.
getParameterFact
(
-
1
,
"
CBRK_AIRSPD_CHK
"
).
value
!=
=
162128
&&
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationAirspeed
&&
showSensorCalibrationAirspeed
indicatorGreen
:
sens_dpres_off
.
value
!=
0
indicatorGreen
:
sens_dpres_off
.
value
!=
=
0
onClicked
:
{
preCalibrationDialogType
=
"
airspeed
"
...
...
src/FactSystem/FactControls/FactBitmask.qml
View file @
299fde42
...
...
@@ -33,10 +33,12 @@ Flow {
checked
:
fact
.
value
&
fact
.
bitmaskValues
[
index
]
onClicked
:
{
var
i
;
var
otherCheckbox
;
if
(
checked
)
{
if
(
firstEntryIsAll
&&
index
==
0
)
{
for
(
var
i
=
1
;
i
<
repeater
.
count
;
i
++
)
{
var
otherCheckbox
=
repeater
.
itemAt
(
i
)
for
(
i
=
1
;
i
<
repeater
.
count
;
i
++
)
{
otherCheckbox
=
repeater
.
itemAt
(
i
)
fact
.
value
&=
~
fact
.
bitmaskValues
[
i
]
otherCheckbox
.
checked
=
false
otherCheckbox
.
enabled
=
false
...
...
@@ -45,8 +47,8 @@ Flow {
fact
.
value
|=
fact
.
bitmaskValues
[
index
]
}
else
{
if
(
firstEntryIsAll
&&
index
==
0
)
{
for
(
var
i
=
1
;
i
<
repeater
.
count
;
i
++
)
{
var
otherCheckbox
=
repeater
.
itemAt
(
i
)
for
(
i
=
1
;
i
<
repeater
.
count
;
i
++
)
{
otherCheckbox
=
repeater
.
itemAt
(
i
)
otherCheckbox
.
enabled
=
true
}
}
...
...
src/FactSystem/FactControls/FactCheckBox.qml
View file @
299fde42
...
...
@@ -8,16 +8,14 @@ import QGroundControl.Controls 1.0
QGCCheckBox
{
property
Fact
fact
:
Fact
{
}
property
variant
checkedValue
:
1
property
variant
uncheckedValue
:
0
checkedState
:
fact
?
(
fact
.
typeIsBool
?
(
fact
.
value
===
true
?
Qt
.
Checked
:
Qt
.
Unc
hecked
)
:
(
fact
.
value
===
checkedValue
?
Qt
.
Checked
:
Qt
.
Unc
hecked
))
:
(
fact
.
value
===
false
?
Qt
.
Unchecked
:
Qt
.
C
hecked
)
:
(
fact
.
value
===
0
?
Qt
.
Unchecked
:
Qt
.
C
hecked
))
:
Qt
.
Unchecked
text
:
qsTr
(
"
Label
"
)
onClicked
:
fact
.
value
=
checked
?
checkedValue
:
uncheckedValue
onClicked
:
fact
.
value
=
checked
?
1
:
0
}
src/FactSystem/FactControls/FactComboBox.qml
View file @
299fde42
...
...
@@ -12,7 +12,7 @@ QGCComboBox {
model
:
fact
?
fact
.
enumStrings
:
null
currentIndex
:
indexModel
?
fact
.
value
:
fact
.
enumIndex
currentIndex
:
fact
?
(
indexModel
?
fact
.
value
:
fact
.
enumIndex
)
:
0
onActivated
:
{
if
(
indexModel
)
{
...
...
src/FactSystem/FactControls/FactTextField.qml
View file @
299fde42
...
...
@@ -32,7 +32,7 @@ QGCTextField {
}
if
(
typeof
qgcView
!==
'
undefined
'
&&
qgcView
)
{
var
errorString
=
fact
.
validate
(
text
,
false
/* convertOnly */
)
if
(
errorString
==
""
)
{
if
(
errorString
==
=
""
)
{
fact
.
value
=
text
}
else
{
_validateString
=
text
...
...
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
299fde42
...
...
@@ -143,7 +143,7 @@ FlightMap {
onNewItemsFromVehicle
:
{
var
visualItems
=
_missionController
.
visualItems
if
(
visualItems
&&
visualItems
.
count
!=
1
)
{
if
(
visualItems
&&
visualItems
.
count
!=
=
1
)
{
mapFitFunctions
.
fitMapViewportToMissionItems
()
firstVehiclePositionReceived
=
true
}
...
...
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
299fde42
...
...
@@ -72,7 +72,7 @@ Item {
instrumentsLoader
.
state
=
"
topMode
"
}
else
{
instrumentsLoader
.
source
=
"
qrc:/qml/QGCInstrumentWidget.qml
"
instrumentsLoader
.
state
=
QGroundControl
.
settingsManager
.
appSettings
.
showLargeCompass
.
value
==
1
?
"
centerMode
"
:
"
topMode
"
instrumentsLoader
.
state
=
QGroundControl
.
settingsManager
.
appSettings
.
showLargeCompass
.
value
==
=
1
?
"
centerMode
"
:
"
topMode
"
}
}
}
else
{
...
...
src/FlightDisplay/GuidedActionsController.qml
View file @
299fde42
...
...
@@ -313,6 +313,8 @@ Item {
// Executes the specified action
function
executeAction
(
actionCode
,
actionData
)
{
var
i
;
var
rgVehicle
;
switch
(
actionCode
)
{
case
actionRTL
:
_activeVehicle
.
guidedModeRTL
()
...
...
@@ -336,10 +338,9 @@ Item {
_activeVehicle
.
startMission
()
break
case
actionMVStartMission
:
var
rgVehicle
=
QGroundControl
.
multiVehicleManager
.
vehicles
for
(
var
i
=
0
;
i
<
rgVehicle
.
count
;
i
++
)
{
var
vehicle
=
rgVehicle
.
get
(
i
)
vehicle
.
startMission
()
rgVehicle
=
QGroundControl
.
multiVehicleManager
.
vehicles
for
(
i
=
0
;
i
<
rgVehicle
.
count
;
i
++
)
{
rgVehicle
.
get
(
i
).
startMission
()
}
break
case
actionArm
:
...
...
@@ -370,10 +371,9 @@ Item {
_activeVehicle
.
pauseVehicle
()
break
case
actionMVPause
:
var
rgVehicle
=
QGroundControl
.
multiVehicleManager
.
vehicles
for
(
var
i
=
0
;
i
<
rgVehicle
.
count
;
i
++
)
{
var
vehicle
=
rgVehicle
.
get
(
i
)
vehicle
.
pauseVehicle
()
rgVehicle
=
QGroundControl
.
multiVehicleManager
.
vehicles
for
(
i
=
0
;
i
<
rgVehicle
.
count
;
i
++
)
{
rgVehicle
.
get
(
i
).
pauseVehicle
()
}
break
case
actionVtolTransitionToFwdFlight
:
...
...
src/FlightDisplay/MultiVehicleList.qml
View file @
299fde42
...
...
@@ -152,7 +152,7 @@ Item {
QGCButton
{
text
:
"
Start Mission
"
visible
:
_vehicle
.
armed
&&
_vehicle
.
flightMode
!=
_vehicle
.
missionFlightMode
visible
:
_vehicle
.
armed
&&
_vehicle
.
flightMode
!=
=
_vehicle
.
missionFlightMode
onClicked
:
_vehicle
.
startMission
()
}
...
...
@@ -164,13 +164,13 @@ Item {
QGCButton
{
text
:
"
RTL
"
visible
:
_vehicle
.
armed
&&
_vehicle
.
flightMode
!=
_vehicle
.
rtlFlightMode
visible
:
_vehicle
.
armed
&&
_vehicle
.
flightMode
!=
=
_vehicle
.
rtlFlightMode
onClicked
:
_vehicle
.
flightMode
=
_vehicle
.
rtlFlightMode
}
QGCButton
{
text
:
"
Take control
"
visible
:
_vehicle
.
armed
&&
_vehicle
.
flightMode
!=
_vehicle
.
takeControlFlightMode
visible
:
_vehicle
.
armed
&&
_vehicle
.
flightMode
!=
=
_vehicle
.
takeControlFlightMode
onClicked
:
_vehicle
.
flightMode
=
_vehicle
.
takeControlFlightMode
}
}
// Row
...
...
src/FlightMap/MapItems/CustomMapItems.qml
View file @
299fde42
...
...
@@ -29,9 +29,9 @@ Item {
Component.onCompleted
:
{
var
controlUrl
=
object
.
url
if
(
controlUrl
!=
""
)
{
if
(
controlUrl
!=
=
""
)
{
var
component
=
Qt
.
createComponent
(
controlUrl
);
if
(
component
.
status
==
Component
.
Ready
)
{
if
(
component
.
status
==
=
Component
.
Ready
)
{
_customObject
=
component
.
createObject
(
map
,
{
"
customMapObject
"
:
object
})
if
(
_customObject
)
{
map
.
addMapItem
(
_customObject
)
...
...
src/FlightMap/MapItems/PolygonEditor.qml
View file @
299fde42
...
...
@@ -233,7 +233,7 @@ Item {
var
clickCoordinate
=
map
.
toCoordinate
(
Qt
.
point
(
mouse
.
x
,
mouse
.
y
),
false
/* clipToViewPort */
)
var
polygonPath
=
_newPolygon
.
path
if
(
polygonPath
.
length
==
0
)
{
if
(
polygonPath
.
length
==
=
0
)
{
// Add first coordinate
polygonPath
.
push
(
clickCoordinate
)
}
else
{
...
...
@@ -252,10 +252,10 @@ Item {
_currentPolygon
.
path
=
polygonPath
_newPolygon
.
path
=
polygonPath
if
(
_mobile
&&
_currentPolygon
.
path
.
length
==
1
)
{
if
(
_mobile
&&
_currentPolygon
.
path
.
length
==
=
1
)
{
_mobilePoint
.
coordinate
=
_currentPolygon
.
path
[
0
]
_mobilePoint
.
visible
=
true
}
else
if
(
_mobile
&&
_currentPolygon
.
path
.
length
==
2
)
{
}
else
if
(
_mobile
&&
_currentPolygon
.
path
.
length
==
=
2
)
{
// Show initial line segment on mobile
_mobileSegment
.
path
=
[
_currentPolygon
.
path
[
0
],
_currentPolygon
.
path
[
1
]
]
_mobileSegment
.
visible
=
true
...
...
src/FlightMap/MapScale.qml
View file @
299fde42
...
...
@@ -115,7 +115,7 @@ Item {
var
rightCoord
=
mapControl
.
toCoordinate
(
Qt
.
point
(
scaleLinePixelLength
,
scale
.
y
),
false
/* clipToViewPort */
)
var
scaleLineMeters
=
Math
.
round
(
leftCoord
.
distanceTo
(
rightCoord
))
if
(
QGroundControl
.
settingsManager
.
unitsSettings
.
distanceUnits
.
value
==
UnitsSettings
.
DistanceUnitsFeet
)
{
if
(
QGroundControl
.
settingsManager
.
unitsSettings
.
distanceUnits
.
value
==
=
UnitsSettings
.
DistanceUnitsFeet
)
{
calculateFeetRatio
(
scaleLineMeters
,
scaleLinePixelLength
)
}
else
{
calculateMetersRatio
(
scaleLineMeters
,
scaleLinePixelLength
)
...
...
src/FlightMap/Widgets/CenterMapDropButton.qml
View file @
299fde42
...
...
@@ -61,7 +61,7 @@ DropButton {
/// Fits the visible region of the map to inclues all of the specified coordinates. If no coordinates
/// are specified the map will center to fitHomePosition()
function
fitMapViewportToAllCoordinates
(
coordList
)
{
if
(
coordList
.
length
==
0
)
{
if
(
coordList
.
length
==
=
0
)
{
map
.
center
=
fitHomePosition
()
return
}
...
...
@@ -115,16 +115,17 @@ DropButton {
}
function
addFenceItemCoordsForFit
(
coordList
)
{
var
i
var
homePosition
=
fitHomePosition
()
if
(
homePosition
.
isValid
&&
geoFenceController
.
circleEnabled
)
{
var
azimuthList
=
[
0
,
180
,
90
,
270
]
for
(
var
i
=
0
;
i
<
azimuthList
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
azimuthList
.
length
;
i
++
)
{
var
edgeCoordinate
=
homePosition
.
atDistanceAndAzimuth
(
geoFenceController
.
circleRadius
,
azimuthList
[
i
])
coordList
.
push
(
edgeCoordinate
)
}
}
if
(
geoFenceController
.
polygonEnabled
&&
geoFenceController
.
polygon
.
count
()
>
2
)
{
for
(
var
i
=
0
;
i
<
geoFenceController
.
polygon
.
count
();
i
++
)
{
for
(
i
=
0
;
i
<
geoFenceController
.
polygon
.
count
();
i
++
)
{
coordList
.
push
(
geoFenceController
.
polygon
.
path
[
i
])
}
}
...
...
src/FlightMap/Widgets/MapFitFunctions.qml
View file @
299fde42
...
...
@@ -49,7 +49,7 @@ Item {
/// are specified the map will center to fitHomePosition()
function
fitMapViewportToAllCoordinates
(
coordList
)
{
var
mapFitViewport
=
Qt
.
rect
(
0
,
0
,
map
.
width
,
map
.
height
)
if
(
coordList
.
length
==
0
)
{
if
(
coordList
.
length
==
=
0
)
{
var
homeCoord
=
fitHomePosition
()
if
(
homeCoord
.
isValid
)
{
map
.
center
=
homeCoord
...
...
@@ -113,16 +113,17 @@ Item {
}
function
addFenceItemCoordsForFit
(
coordList
)
{
var
i
var
homePosition
=
fitHomePosition
()
if
(
homePosition
.
isValid
&&
_geoFenceController
.
circleEnabled
)
{
var
azimuthList
=
[
0
,
180
,
90
,
270
]
for
(
var
i
=
0
;
i
<
azimuthList
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
azimuthList
.
length
;
i
++
)
{
var
edgeCoordinate
=
homePosition
.
atDistanceAndAzimuth
(
_geoFenceController
.
circleRadius
,
azimuthList
[
i
])
coordList
.
push
(
edgeCoordinate
)
}
}
if
(
_geoFenceController
.
polygonEnabled
&&
_geoFenceController
.
mapPolygon
.
path
.
count
>
2
)
{
for
(
var
i
=
0
;
i
<
_geoFenceController
.
mapPolygon
.
path
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
_geoFenceController
.
mapPolygon
.
path
.
count
;
i
++
)
{
coordList
.
push
(
_geoFenceController
.
mapPolygon
.
path
[
i
])
}
}
...
...
src/FlightMap/Widgets/ValuePageWidget.qml
View file @
299fde42
...
...
@@ -174,8 +174,8 @@ Column {
anchors.right
:
parent
.
right
sourceComponent
:
factGroupList
property
var
factGroup
:
_activeVehicle
property
var
factGroupName
:
"
Vehicle
"
property
var
factGroup
:
_activeVehicle
property
string
factGroupName
:
"
Vehicle
"
}
}
}
...
...
src/PlanView/CameraCalc.qml
View file @
299fde42
...
...
@@ -39,7 +39,7 @@ Column {
}
gridTypeCombo
.
model
=
_cameraList
var
knownCameraIndex
=
gridTypeCombo
.
find
(
cameraCalc
.
cameraName
)
if
(
knownCameraIndex
!=
-
1
)
{
if
(
knownCameraIndex
!=
=
-
1
)
{
gridTypeCombo
.
currentIndex
=
knownCameraIndex
}
else
{
console
.
log
(
"
Internal error: Known camera not found
"
,
cameraCalc
.
cameraName
)
...
...
src/PlanView/CameraSection.qml
View file @
299fde42
...
...
@@ -46,7 +46,7 @@ Column {
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
ScreenTools
.
defaultFontPixelWidth
visible
:
_camera
.
cameraAction
.
rawValue
==
1
visible
:
_camera
.
cameraAction
.
rawValue
==
=
1
QGCLabel
{
text
:
qsTr
(
"
Time
"
)
...
...
@@ -62,7 +62,7 @@ Column {
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
ScreenTools
.
defaultFontPixelWidth
visible
:
_camera
.
cameraAction
.
rawValue
==
2
visible
:
_camera
.
cameraAction
.
rawValue
==
=
2
QGCLabel
{
text
:
qsTr
(
"
Distance
"
)
...
...
src/PlanView/GeoFenceEditor.qml
View file @
299fde42
...
...
@@ -154,7 +154,7 @@ QGCFlickable {
QGCLabel
{
text
:
qsTr
(
"
None
"
)
visible
:
polygonSection
.
checked
&&
myGeoFenceController
.
polygons
.
count
==
0
visible
:
polygonSection
.
checked
&&
myGeoFenceController
.
polygons
.
count
==
=
0
}
GridLayout
{
...
...
@@ -239,7 +239,7 @@ QGCFlickable {
QGCLabel
{
text
:
qsTr
(
"
None
"
)
visible
:
circleSection
.
checked
&&
myGeoFenceController
.
circles
.
count
==
0
visible
:
circleSection
.
checked
&&
myGeoFenceController
.
circles
.
count
==
=
0
}
GridLayout
{
...
...
src/PlanView/MissionItemEditor.qml
View file @
299fde42
...
...
@@ -89,7 +89,7 @@ Rectangle {
height
:
_hamburgerSize
sourceSize.height
:
_hamburgerSize
source
:
"
qrc:/qmlimages/Hamburger.svg
"
visible
:
missionItem
.
isCurrentItem
&&
missionItem
.
sequenceNumber
!=
0
visible
:
missionItem
.
isCurrentItem
&&
missionItem
.
sequenceNumber
!=
=
0
color
:
qgcPal
.
windowShade
}
...
...
src/PlanView/PlanToolBar.qml
View file @
299fde42
...
...
@@ -32,13 +32,13 @@ Rectangle {
property
real
missionMaxTelemetry
:
_controllerValid
?
planMasterController
.
missionController
.
missionMaxTelemetry
:
NaN
property
bool
missionDirty
:
_controllerValid
?
planMasterController
.
missionController
.
dirty
:
false
property
bool
_controllerValid
:
planMasterController
!=
undefined
property
bool
_controllerValid
:
planMasterController
!=
=
undefined
property
bool
_controllerOffline
:
_controllerValid
?
planMasterController
.
offline
:
true
property
var
_controllerDirty
:
_controllerValid
?
planMasterController
.
dirty
:
false
property
var
_controllerSyncInProgress
:
_controllerValid
?
planMasterController
.
syncInProgress
:
false
property
bool
_statusValid
:
currentMissionItem
!=
undefined
property
bool
_missionValid
:
missionItems
!=
undefined
property
bool
_statusValid
:
currentMissionItem
!=
=
undefined
property
bool
_missionValid
:
missionItems
!=
=
undefined
property
real
_dataFontSize
:
ScreenTools
.
defaultFontPointSize
property
real
_largeValueWidth
:
ScreenTools
.
defaultFontPixelWidth
*
8
...
...
src/PlanView/PlanView.qml
View file @
299fde42
...
...
@@ -238,7 +238,7 @@ QGCView {
QGCFileDialog
{
id
:
fileDialog
qgcView
:
_qgcView
property
var
plan
:
true
property
bool
plan
:
true
folder
:
QGroundControl
.
settingsManager
.
appSettings
.
missionSavePath
fileExtension
:
QGroundControl
.
settingsManager
.
appSettings
.
planFileExtension
fileExtension2
:
QGroundControl
.
settingsManager
.
appSettings
.
missionFileExtension
...
...
@@ -263,7 +263,7 @@ QGCView {
function
accept
()
{
var
toIndex
=
toCombo
.
currentIndex
if
(
toIndex
==
0
)
{
if
(
toIndex
==
=
0
)
{
toIndex
=
1
}
_missionController
.
moveMissionItem
(
_moveDialogMissionItemIndex
,
toIndex
)
...
...
src/PlanView/RallyPointItemEditor.qml
View file @
299fde42
...
...
@@ -17,7 +17,7 @@ Rectangle {
property
var
rallyPoint
///< RallyPoint object associated with editor
property
var
controller
///< RallyPointController
property
bool
_currentItem
:
rallyPoint
?
rallyPoint
==
controller
.
currentRallyPoint
:
false
property
bool
_currentItem
:
rallyPoint
?
rallyPoint
==
=
controller
.
currentRallyPoint
:
false
property
color
_outerTextColor
:
_currentItem
?
"
black
"
:
qgcPal
.
text
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
...
...
src/PlanView/RallyPointMapVisuals.qml
View file @
299fde42
...
...
@@ -45,7 +45,7 @@ Item {
MissionItemIndicatorDrag
{
itemCoordinate
:
rallyPointObject
.
coordinate
visible
:
rallyPointObject
==
myRallyPointController
.
currentRallyPoint
visible
:
rallyPointObject
==
=
myRallyPointController
.
currentRallyPoint
property
var
rallyPointObject
...
...
@@ -67,7 +67,7 @@ Item {
sourceItem
:
MissionItemIndexLabel
{
id
:
itemIndexLabel
label
:
qsTr
(
"
R
"
,
"
rally point map item label
"
)
checked
:
_editingLayer
==
_layerRallyPoints
?
rallyPointObject
==
myRallyPointController
.
currentRallyPoint
:
false
checked
:
_editingLayer
==
_layerRallyPoints
?
rallyPointObject
==
=
myRallyPointController
.
currentRallyPoint
:
false
onClicked
:
myRallyPointController
.
currentRallyPoint
=
rallyPointObject
}
...
...
src/PlanView/SimpleItemEditor.qml
View file @
299fde42
...
...
@@ -44,7 +44,7 @@ Rectangle {
QGCLabel
{
text
:
object
.
name
visible
:
object
.
name
!=
""
visible
:
object
.
name
!=
=
""
Layout.column
:
0
Layout.row
:
index
}
...
...
src/PlanView/SurveyItemEditor.qml
View file @
299fde42
...
...
@@ -46,7 +46,7 @@ Rectangle {
}
else
{
var
index
=
-
1
for
(
index
=
0
;
index
<
_cameraList
.
length
;
index
++
)
{
if
(
_cameraList
[
index
]
==
missionItem
.
camera
.
value
)
{
if
(
_cameraList
[
index
]
==
=
missionItem
.
camera
.
value
)
{
break
;
}
}
...
...
@@ -243,7 +243,7 @@ Rectangle {
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
_margin
visible
:
missionItem
.
manualGrid
.
value
==
true
visible
:
missionItem
.
manualGrid
.
value
QGCCheckBox
{
id
:
cameraTriggerDistanceCheckBox
...
...
@@ -273,7 +273,7 @@ Rectangle {
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
_margin
visible
:
gridTypeCombo
.
currentIndex
!=
_gridTypeManual
visible
:
gridTypeCombo
.
currentIndex
!=
=
_gridTypeManual
Row
{
spacing
:
_margin
...
...
@@ -443,7 +443,7 @@ Rectangle {
id
:
windRoseButton
anchors.verticalCenter
:
angleText
.
verticalCenter
iconSource
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
?
"
/res/wind-roseBlack.svg
"
:
"
/res/wind-rose.svg
"
visible
:
_vehicle
.
fixedWing
visible
:
_vehicle
?
_vehicle
.
fixedWing
:
false
onClicked
:
{
windRosePie
.
angle
=
Number
(
gridAngleText
.
text
)
...
...
@@ -522,7 +522,7 @@ Rectangle {
SectionHeader
{
id
:
manualGridHeader
text
:
qsTr
(
"
Grid
"
)
visible
:
gridTypeCombo
.
currentIndex
==
_gridTypeManual
visible
:
gridTypeCombo
.
currentIndex
==
=
_gridTypeManual
}
GridLayout
{
...
...
@@ -547,7 +547,7 @@ Rectangle {
anchors.verticalCenter
:
manualAngleText
.
verticalCenter
Layout.columnSpan
:
1
iconSource
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
?
"
/res/wind-roseBlack.svg
"
:
"
/res/wind-rose.svg
"
visible
:
_vehicle
.
fixedWing
visible
:
_vehicle
?
_vehicle
.
fixedWing
:
false
onClicked
:
{
var
cords
=
manualWindRoseButton
.
mapToItem
(
_root
,
0
,
0
)
...
...
src/PlanView/SurveyMapVisual.qml
View file @
299fde42
...
...
@@ -90,6 +90,7 @@ Item {
QGCMapPolygonVisuals
{
id
:
mapPolygonVisuals
qgcView
:
_root
.
qgcView
mapControl
:
map
mapPolygon
:
_mapPolygon
interactive
:
_missionItem
.
isCurrentItem
...
...
src/QmlControls/DropButton.qml
View file @
299fde42
...
...
@@ -175,9 +175,9 @@ Item {
id
:
arrowCanvas
anchors.fill
:
parent
property
var
arrowPoint
:
Qt
.
point
(
0
,
0
)
property
var
arrowBase1
:
Qt
.
point
(
0
,
0
)
property
var
arrowBase2
:
Qt
.
point
(
0
,
0
)
property
point
arrowPoint
:
Qt
.
point
(
0
,
0
)
property
point
arrowBase1
:
Qt
.
point
(
0
,
0
)
property
point
arrowBase2
:
Qt
.
point
(
0
,
0
)
onPaint
:
{
var
context
=
getContext
(
"
2d
"
)
...
...
src/QmlControls/DropPanel.qml
View file @
299fde42
...
...
@@ -124,9 +124,9 @@ Item {
id
:
arrowCanvas
anchors.fill
:
parent
property
var
arrowPoint
:
Qt
.
point
(
0
,
0
)
property
var
arrowBase1
:
Qt
.
point
(
0
,
0
)
property
var
arrowBase2
:
Qt
.
point
(
0
,
0
)
property
point
arrowPoint
:
Qt
.
point
(
0
,
0
)
property
point
arrowBase1
:
Qt
.
point
(
0
,
0
)
property
point
arrowBase2
:
Qt
.
point
(
0
,
0
)
onPaint
:
{
var
context
=
getContext
(
"
2d
"
)
...
...
src/QmlControls/FlightModeMenu.qml
View file @
299fde42
...
...
@@ -37,13 +37,14 @@ QGCLabel {
function
updateFlightModesMenu
()
{
if
(
activeVehicle
&&
activeVehicle
.
flightModeSetAvailable
)
{
var
i
;
// Remove old menu items
for
(
var
i
=
0
;
i
<
flightModesMenuItems
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
flightModesMenuItems
.
length
;
i
++
)
{
flightModesMenu
.
removeItem
(
flightModesMenuItems
[
i
])
}
flightModesMenuItems
.
length
=
0
// Add new items
for
(
var
i
=
0
;
i
<
activeVehicle
.
flightModes
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
activeVehicle
.
flightModes
.
length
;
i
++
)
{
var
menuItem
=
flightModeMenuItemComponent
.
createObject
(
null
,
{
"
text
"
:
activeVehicle
.
flightModes
[
i
]
})
flightModesMenuItems
.
push
(
menuItem
)
flightModesMenu
.
insertItem
(
i
,
menuItem
)
...
...
src/QmlControls/MissionCommandDialog.qml
View file @
299fde42
...
...
@@ -68,7 +68,7 @@ QGCViewDialog {
color
:
qgcPal
.
button
property
var
mavCmdInfo
:
modelData
property
var
textColor
:
qgcPal
.
buttonText
property
color
textColor
:
qgcPal
.
buttonText
Column
{
id
:
commandColumn
...
...
src/QmlControls/ParameterEditor.qml
View file @
299fde42
...
...
@@ -253,7 +253,7 @@ QGCView {
id
:
valueLabel
width
:
ScreenTools
.
defaultFontPixelWidth
*
20
color
:
factRow
.
modelFact
.
defaultValueAvailable
?
(
factRow
.
modelFact
.
valueEqualsDefault
?
__qgcPal
.
text
:
__qgcPal
.
warningText
)
:
__qgcPal
.
text
text
:
factRow
.
modelFact
.
enumStrings
.
length
==
0
?
factRow
.
modelFact
.
valueString
+
"
"
+
factRow
.
modelFact
.
units
:
factRow
.
modelFact
.
enumStringValue
text
:
factRow
.
modelFact
.
enumStrings
.
length
==
=
0
?
factRow
.
modelFact
.
valueString
+
"
"
+
factRow
.
modelFact
.
units
:
factRow
.
modelFact
.
enumStringValue
clip
:
true
}
...
...
src/QmlControls/ParameterEditorDialog.qml
View file @
299fde42
...
...
@@ -116,7 +116,7 @@ QGCViewDialog {
QGCTextField
{
id
:
valueField
text
:
validate
?
validateValue
:
fact
.
valueString
visible
:
fact
.
enumStrings
.
length
==
0
||
validate
||
manualEntry
.
checked
visible
:
fact
.
enumStrings
.
length
==
=
0
||
validate
||
manualEntry
.
checked
unitsLabel
:
fact
.
units
showUnits
:
fact
.
units
!=
""
Layout.fillWidth
:
true
...
...
@@ -145,7 +145,7 @@ QGCViewDialog {
visible
:
_showCombo
model
:
fact
.
enumStrings
property
bool
_showCombo
:
fact
.
enumStrings
.
length
!=
0
&&
fact
.
bitmaskStrings
.
length
==
0
&&
!
validate
property
bool
_showCombo
:
fact
.
enumStrings
.
length
!=
=
0
&&
fact
.
bitmaskStrings
.
length
=
==
0
&&
!
validate
Component.onCompleted
:
{
// We can't bind directly to fact.enumIndex since that would add an unknown value
...
...
src/QmlControls/QGCFileDialog.qml
View file @
299fde42
...
...
@@ -144,7 +144,7 @@ Item {
QGCLabel
{
text
:
qsTr
(
"
No files
"
)
visible
:
fileList
.
model
.
length
==
0
visible
:
fileList
.
model
.
length
==
=
0
}
}
}
...
...
src/QmlControls/QGCFlickableHorizontalIndicator.qml
View file @
299fde42
...
...
@@ -11,9 +11,9 @@ Rectangle {
color
:
parent
.
indicatorColor
visible
:
showIndicator
property
bool
showIndicator
:
(
parent
.
flickableDirection
==
Flickable
.
AutoFlickDirection
||
parent
.
flickableDirection
==
Flickable
.
HorizontalFlick
||
parent
.
flickableDirection
==
Flickable
.
HorizontalAndVerticalFlick
)
&&
property
bool
showIndicator
:
(
parent
.
flickableDirection
==
=
Flickable
.
AutoFlickDirection
||
parent
.
flickableDirection
==
=
Flickable
.
HorizontalFlick
||
parent
.
flickableDirection
==
=
Flickable
.
HorizontalAndVerticalFlick
)
&&
(
parent
.
contentWidth
>
parent
.
width
)
Component.onCompleted
:
animateOpacity
.
restart
()
...
...
src/QmlControls/QGCFlickableVerticalIndicator.qml
View file @
299fde42
...
...
@@ -11,9 +11,9 @@ Rectangle {
color
:
parent
.
indicatorColor
visible
:
showIndicator
property
bool
showIndicator
:
(
parent
.
flickableDirection
==
Flickable
.
AutoFlickDirection
||
parent
.
flickableDirection
==
Flickable
.
VerticalFlick
||
parent
.
flickableDirection
==
Flickable
.
HorizontalAndVerticalFlick
)
&&
property
bool
showIndicator
:
(
parent
.
flickableDirection
==
=
Flickable
.
AutoFlickDirection
||
parent
.
flickableDirection
==
=
Flickable
.
VerticalFlick
||
parent
.
flickableDirection
==
=
Flickable
.
HorizontalAndVerticalFlick
)
&&
(
parent
.
contentHeight
>
parent
.
height
)
Component.onCompleted
:
animateOpacity
.
restart
()
...
...
src/QmlControls/QGCPipable.qml
View file @
299fde42
...
...
@@ -51,8 +51,8 @@ Item {
anchors.right
:
parent
.
right
height
:
ScreenTools
.
minTouchPixels
width
:
height
property
var
initialX
:
0
property
var
initialWidth
:
0
property
real
initialX
:
0
property
real
initialWidth
:
0
onClicked
:
{
// TODO propagate
...
...
@@ -98,7 +98,7 @@ Item {
}
// Resize pip window if necessary when main window is resized
property
var
pipLock
:
2
property
int
pipLock
:
2
Connections
{
target
:
pip
.
parent
...
...
src/QmlControls/QGCView.qml
View file @
299fde42
...
...
@@ -58,7 +58,7 @@ FactPanel {
console
.
log
(
"
Error loading QGCViewDialogContainer.qml:
"
,
dialogComponent
.
errorString
())
return
}
var
dialogWidth
=
charWidth
==
showDialogFullWidth
?
parent
.
width
:
ScreenTools
.
defaultFontPixelWidth
*
charWidth
var
dialogWidth
=
charWidth
==
=
showDialogFullWidth
?
parent
.
width
:
ScreenTools
.
defaultFontPixelWidth
*
charWidth
var
dialog
=
dialogComponent
.
createObject
(
_rootItem
,
{
"
anchors.fill
"
:
_rootItem
,
...
...
src/QmlControls/QGCViewDialog.qml
View file @
299fde42
...
...
@@ -27,10 +27,10 @@ FactPanel {
signal
hideDialog
Keys.onReleased
:
{
if
(
event
.
key
==
Qt
.
Key_Escape
)
{
if
(
event
.
key
==
=
Qt
.
Key_Escape
)
{
reject
()
event
.
accepted
=
true
}
else
if
(
event
.
key
==
Qt
.
Key_Return
||
event
.
key
==
Qt
.
Key_Enter
)
{
}
else
if
(
event
.
key
==
=
Qt
.
Key_Return
||
event
.
key
=
==
Qt
.
Key_Enter
)
{
accept
()
event
.
accepted
=
true
}
...
...
src/QmlControls/QmlTest.qml
View file @
299fde42
This diff is collapsed.
Click to expand it.
src/VehicleSetup/FirmwareUpgrade.qml
View file @
299fde42
...
...
@@ -56,7 +56,7 @@ SetupPage {
readonly
property
int
_defaultFimwareTypeAPM
:
3
property
var
_defaultFirmwareFact
:
QGroundControl
.
settingsManager
.
appSettings
.
defaultFirmwareType
property
bool
_defaultFirmwareIsPX4
:
_defaultFirmwareFact
.
rawValue
==
_defaultFimwareTypePX4
property
bool
_defaultFirmwareIsPX4
:
_defaultFirmwareFact
.
rawValue
==
=
_defaultFimwareTypePX4
property
string
firmwareWarningMessage
property
bool
controllerCompleted
:
false
...
...
@@ -354,13 +354,13 @@ SetupPage {
onActivated
:
{
controller
.
selectedFirmwareType
=
index
if
(
model
.
get
(
index
).
firmwareType
==
FirmwareUpgradeController
.
BetaFirmware
)
{
if
(
model
.
get
(
index
).
firmwareType
==
=
FirmwareUpgradeController
.
BetaFirmware
)
{
firmwareVersionWarningLabel
.
visible
=
true
firmwareVersionWarningLabel
.
text
=
qsTr
(
"
WARNING: BETA FIRMWARE.
"
)
+
qsTr
(
"
This firmware version is ONLY intended for beta testers.
"
)
+
qsTr
(
"
Although it has received FLIGHT TESTING, it represents actively changed code.
"
)
+
qsTr
(
"
Do NOT use for normal operation.
"
)
}
else
if
(
model
.
get
(
index
).
firmwareType
==
FirmwareUpgradeController
.
DeveloperFirmware
)
{
}
else
if
(
model
.
get
(
index
).
firmwareType
==
=
FirmwareUpgradeController
.
DeveloperFirmware
)
{
firmwareVersionWarningLabel
.
visible
=
true
firmwareVersionWarningLabel
.
text
=
qsTr
(
"
WARNING: CONTINUOUS BUILD FIRMWARE.
"
)
+
qsTr
(
"
This firmware has NOT BEEN FLIGHT TESTED.
"
)
+
...
...
src/VehicleSetup/VehicleSummary.qml
View file @
299fde42
...
...
@@ -128,12 +128,12 @@ Rectangle {
height
:
width
radius
:
width
/
2
color
:
modelData
.
setupComplete
?
"
#00d932
"
:
"
red
"
visible
:
modelData
.
requiresSetup
&&
modelData
.
setupSource
!=
""
visible
:
modelData
.
requiresSetup
&&
modelData
.
setupSource
!=
=
""
}
onClicked
:
{
console
.
log
(
modelData
.
setupSource
)
if
(
modelData
.
setupSource
!=
""
)
{
if
(
modelData
.
setupSource
!=
=
""
)
{
setupView
.
showVehicleComponentPanel
(
modelData
)
}
}
...
...
src/ViewWidgets/ViewWidget.qml
View file @
299fde42
...
...
@@ -2,8 +2,10 @@ import QtQuick 2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.4
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Palette
1.0
Rectangle
{
property
Component
connectedComponent
:
__componentConnected
...
...
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