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