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
f711da24
Unverified
Commit
f711da24
authored
Mar 31, 2020
by
Don Gagne
Committed by
GitHub
Mar 31, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8626 from mavlink/NewWizardDoneModel
Plan: New wizard done model
parents
675b9e79
56017ae7
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
106 additions
and
37 deletions
+106
-37
CorridorScanComplexItem.cc
src/MissionManager/CorridorScanComplexItem.cc
+16
-8
CorridorScanComplexItem.h
src/MissionManager/CorridorScanComplexItem.h
+3
-2
QGCMapPolygon.cc
src/MissionManager/QGCMapPolygon.cc
+8
-0
QGCMapPolygon.h
src/MissionManager/QGCMapPolygon.h
+3
-1
QGCMapPolyline.cc
src/MissionManager/QGCMapPolyline.cc
+8
-0
QGCMapPolyline.h
src/MissionManager/QGCMapPolyline.h
+3
-1
StructureScanComplexItem.cc
src/MissionManager/StructureScanComplexItem.cc
+9
-0
StructureScanComplexItem.h
src/MissionManager/StructureScanComplexItem.h
+12
-11
SurveyComplexItem.cc
src/MissionManager/SurveyComplexItem.cc
+10
-0
SurveyComplexItem.h
src/MissionManager/SurveyComplexItem.h
+5
-3
CorridorScanEditor.qml
src/PlanView/CorridorScanEditor.qml
+5
-1
FWLandingPatternEditor.qml
src/PlanView/FWLandingPatternEditor.qml
+3
-2
MissionItemEditor.qml
src/PlanView/MissionItemEditor.qml
+2
-2
SimpleItemEditor.qml
src/PlanView/SimpleItemEditor.qml
+3
-2
StructureScanEditor.qml
src/PlanView/StructureScanEditor.qml
+5
-1
SurveyItemEditor.qml
src/PlanView/SurveyItemEditor.qml
+11
-3
No files found.
src/MissionManager/CorridorScanComplexItem.cc
View file @
f711da24
...
...
@@ -41,18 +41,19 @@ CorridorScanComplexItem::CorridorScanComplexItem(PlanMasterController* masterCon
_cameraCalc
.
distanceToSurface
()
->
setRawValue
(
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
defaultMissionItemAltitude
()
->
rawValue
());
}
connect
(
&
_corridorWidthFact
,
&
Fact
::
valueChanged
,
this
,
&
CorridorScanComplexItem
::
_setDirty
);
connect
(
&
_corridorPolyline
,
&
QGCMapPolyline
::
pathChanged
,
this
,
&
CorridorScanComplexItem
::
_setDirty
);
connect
(
&
_corridorWidthFact
,
&
Fact
::
valueChanged
,
this
,
&
CorridorScanComplexItem
::
_setDirty
);
connect
(
&
_corridorPolyline
,
&
QGCMapPolyline
::
pathChanged
,
this
,
&
CorridorScanComplexItem
::
_setDirty
);
connect
(
&
_cameraCalc
,
&
CameraCalc
::
distanceToSurfaceRelativeChanged
,
this
,
&
CorridorScanComplexItem
::
coordinateHasRelativeAltitudeChanged
);
connect
(
&
_cameraCalc
,
&
CameraCalc
::
distanceToSurfaceRelativeChanged
,
this
,
&
CorridorScanComplexItem
::
exitCoordinateHasRelativeAltitudeChanged
);
connect
(
&
_cameraCalc
,
&
CameraCalc
::
distanceToSurfaceRelativeChanged
,
this
,
&
CorridorScanComplexItem
::
coordinateHasRelativeAltitudeChanged
);
connect
(
&
_cameraCalc
,
&
CameraCalc
::
distanceToSurfaceRelativeChanged
,
this
,
&
CorridorScanComplexItem
::
exitCoordinateHasRelativeAltitudeChanged
);
connect
(
&
_corridorPolyline
,
&
QGCMapPolyline
::
dirtyChanged
,
this
,
&
CorridorScanComplexItem
::
_polylineDirtyChanged
);
connect
(
&
_corridorPolyline
,
&
QGCMapPolyline
::
dirtyChanged
,
this
,
&
CorridorScanComplexItem
::
_polylineDirtyChanged
);
connect
(
&
_corridorPolyline
,
&
QGCMapPolyline
::
pathChanged
,
this
,
&
CorridorScanComplexItem
::
_rebuildCorridorPolygon
);
connect
(
&
_corridorWidthFact
,
&
Fact
::
valueChanged
,
this
,
&
CorridorScanComplexItem
::
_rebuildCorridorPolygon
);
connect
(
&
_corridorPolyline
,
&
QGCMapPolyline
::
pathChanged
,
this
,
&
CorridorScanComplexItem
::
_rebuildCorridorPolygon
);
connect
(
&
_corridorWidthFact
,
&
Fact
::
valueChanged
,
this
,
&
CorridorScanComplexItem
::
_rebuildCorridorPolygon
);
connect
(
&
_corridorPolyline
,
&
QGCMapPolyline
::
isValidChanged
,
this
,
&
CorridorScanComplexItem
::
readyForSaveStateChanged
);
connect
(
&
_corridorPolyline
,
&
QGCMapPolyline
::
isValidChanged
,
this
,
&
CorridorScanComplexItem
::
_updateWizardMode
);
connect
(
&
_corridorPolyline
,
&
QGCMapPolyline
::
traceModeChanged
,
this
,
&
CorridorScanComplexItem
::
_updateWizardMode
);
if
(
!
kmlFile
.
isEmpty
())
{
_corridorPolyline
.
loadKMLFile
(
kmlFile
);
...
...
@@ -384,3 +385,10 @@ double CorridorScanComplexItem::_calcTransectSpacing(void) const
return
transectSpacing
;
}
void
CorridorScanComplexItem
::
_updateWizardMode
(
void
)
{
if
(
_corridorPolyline
.
isValid
()
&&
!
_corridorPolyline
.
traceMode
())
{
setWizardMode
(
false
);
}
}
src/MissionManager/CorridorScanComplexItem.h
View file @
f711da24
...
...
@@ -58,8 +58,9 @@ public:
static
const
char
*
corridorWidthName
;
private
slots
:
void
_polylineDirtyChanged
(
bool
dirty
);
void
_rebuildCorridorPolygon
(
void
);
void
_polylineDirtyChanged
(
bool
dirty
);
void
_rebuildCorridorPolygon
(
void
);
void
_updateWizardMode
(
void
);
// Overrides from TransectStyleComplexItem
void
_rebuildTransectsPhase1
(
void
)
final
;
...
...
src/MissionManager/QGCMapPolygon.cc
View file @
f711da24
...
...
@@ -598,3 +598,11 @@ QDomElement QGCMapPolygon::kmlPolygonElement(KMLDomDocument& domDocument)
return
polygonElement
;
}
void
QGCMapPolygon
::
setTraceMode
(
bool
traceMode
)
{
if
(
traceMode
!=
_traceMode
)
{
_traceMode
=
traceMode
;
emit
traceModeChanged
(
traceMode
);
}
}
src/MissionManager/QGCMapPolygon.h
View file @
f711da24
...
...
@@ -39,7 +39,7 @@ public:
Q_PROPERTY
(
bool
interactive
READ
interactive
WRITE
setInteractive
NOTIFY
interactiveChanged
)
Q_PROPERTY
(
bool
isValid
READ
isValid
NOTIFY
isValidChanged
)
Q_PROPERTY
(
bool
empty
READ
empty
NOTIFY
isEmptyChanged
)
Q_PROPERTY
(
bool
traceMode
MEMBER
_traceMode
NOTIFY
traceModeChanged
)
Q_PROPERTY
(
bool
traceMode
READ
traceMode
WRITE
setTraceMode
NOTIFY
traceModeChanged
)
Q_INVOKABLE
void
clear
(
void
);
Q_INVOKABLE
void
appendVertex
(
const
QGeoCoordinate
&
coordinate
);
...
...
@@ -105,6 +105,7 @@ public:
bool
interactive
(
void
)
const
{
return
_interactive
;
}
bool
isValid
(
void
)
const
{
return
_polygonModel
.
count
()
>=
3
;
}
bool
empty
(
void
)
const
{
return
_polygonModel
.
count
()
==
0
;
}
bool
traceMode
(
void
)
const
{
return
_traceMode
;
}
QVariantList
path
(
void
)
const
{
return
_polygonPath
;
}
QmlObjectListModel
*
qmlPathModel
(
void
)
{
return
&
_polygonModel
;
}
...
...
@@ -115,6 +116,7 @@ public:
void
setCenter
(
QGeoCoordinate
newCenter
);
void
setCenterDrag
(
bool
centerDrag
);
void
setInteractive
(
bool
interactive
);
void
setTraceMode
(
bool
traceMode
);
static
const
char
*
jsonPolygonKey
;
...
...
src/MissionManager/QGCMapPolyline.cc
View file @
f711da24
...
...
@@ -431,3 +431,11 @@ void QGCMapPolyline::_endResetIfNotActive(void)
endReset
();
}
}
void
QGCMapPolyline
::
setTraceMode
(
bool
traceMode
)
{
if
(
traceMode
!=
_traceMode
)
{
_traceMode
=
traceMode
;
emit
traceModeChanged
(
traceMode
);
}
}
src/MissionManager/QGCMapPolyline.h
View file @
f711da24
...
...
@@ -32,7 +32,7 @@ public:
Q_PROPERTY
(
bool
interactive
READ
interactive
WRITE
setInteractive
NOTIFY
interactiveChanged
)
Q_PROPERTY
(
bool
isValid
READ
isValid
NOTIFY
isValidChanged
)
Q_PROPERTY
(
bool
empty
READ
empty
NOTIFY
isEmptyChanged
)
Q_PROPERTY
(
bool
traceMode
MEMBER
_traceMode
NOTIFY
traceModeChanged
)
Q_PROPERTY
(
bool
traceMode
READ
traceMode
WRITE
setTraceMode
NOTIFY
traceModeChanged
)
Q_INVOKABLE
void
clear
(
void
);
Q_INVOKABLE
void
appendVertex
(
const
QGeoCoordinate
&
coordinate
);
...
...
@@ -89,6 +89,7 @@ public:
QVariantList
path
(
void
)
const
{
return
_polylinePath
;
}
bool
isValid
(
void
)
const
{
return
_polylineModel
.
count
()
>=
2
;
}
bool
empty
(
void
)
const
{
return
_polylineModel
.
count
()
==
0
;
}
bool
traceMode
(
void
)
const
{
return
_traceMode
;
}
QmlObjectListModel
*
qmlPathModel
(
void
)
{
return
&
_polylineModel
;
}
QmlObjectListModel
&
pathModel
(
void
)
{
return
_polylineModel
;
}
...
...
@@ -96,6 +97,7 @@ public:
void
setPath
(
const
QList
<
QGeoCoordinate
>&
path
);
void
setPath
(
const
QVariantList
&
path
);
void
setInteractive
(
bool
interactive
);
void
setTraceMode
(
bool
traceMode
);
static
const
char
*
jsonPolylineKey
;
...
...
src/MissionManager/StructureScanComplexItem.cc
View file @
f711da24
...
...
@@ -71,6 +71,8 @@ StructureScanComplexItem::StructureScanComplexItem(PlanMasterController* masterC
connect
(
&
_structurePolygon
,
&
QGCMapPolygon
::
dirtyChanged
,
this
,
&
StructureScanComplexItem
::
_polygonDirtyChanged
);
connect
(
&
_structurePolygon
,
&
QGCMapPolygon
::
pathChanged
,
this
,
&
StructureScanComplexItem
::
_rebuildFlightPolygon
);
connect
(
&
_structurePolygon
,
&
QGCMapPolygon
::
isValidChanged
,
this
,
&
StructureScanComplexItem
::
readyForSaveStateChanged
);
connect
(
&
_structurePolygon
,
&
QGCMapPolygon
::
isValidChanged
,
this
,
&
StructureScanComplexItem
::
_updateWizardMode
);
connect
(
&
_structurePolygon
,
&
QGCMapPolygon
::
traceModeChanged
,
this
,
&
StructureScanComplexItem
::
_updateWizardMode
);
connect
(
&
_structurePolygon
,
&
QGCMapPolygon
::
countChanged
,
this
,
&
StructureScanComplexItem
::
_updateLastSequenceNumber
);
connect
(
&
_layersFact
,
&
Fact
::
valueChanged
,
this
,
&
StructureScanComplexItem
::
_updateLastSequenceNumber
);
...
...
@@ -626,3 +628,10 @@ StructureScanComplexItem::ReadyForSaveState StructureScanComplexItem::readyForSa
{
return
_structurePolygon
.
isValid
()
&&
!
_wizardMode
?
ReadyForSave
:
NotReadyForSaveData
;
}
void
StructureScanComplexItem
::
_updateWizardMode
(
void
)
{
if
(
_structurePolygon
.
isValid
()
&&
!
_structurePolygon
.
traceMode
())
{
setWizardMode
(
false
);
}
}
src/MissionManager/StructureScanComplexItem.h
View file @
f711da24
...
...
@@ -117,17 +117,18 @@ signals:
private
slots
:
void
_setDirty
(
void
);
void
_polygonDirtyChanged
(
bool
dirty
);
void
_flightPathChanged
(
void
);
void
_clearInternal
(
void
);
void
_updateCoordinateAltitudes
(
void
);
void
_rebuildFlightPolygon
(
void
);
void
_recalcCameraShots
(
void
);
void
_recalcLayerInfo
(
void
);
void
_updateLastSequenceNumber
(
void
);
void
_updateGimbalPitch
(
void
);
void
_signalTopBottomAltChanged
(
void
);
void
_recalcScanDistance
(
void
);
void
_polygonDirtyChanged
(
bool
dirty
);
void
_flightPathChanged
(
void
);
void
_clearInternal
(
void
);
void
_updateCoordinateAltitudes
(
void
);
void
_rebuildFlightPolygon
(
void
);
void
_recalcCameraShots
(
void
);
void
_recalcLayerInfo
(
void
);
void
_updateLastSequenceNumber
(
void
);
void
_updateGimbalPitch
(
void
);
void
_signalTopBottomAltChanged
(
void
);
void
_recalcScanDistance
(
void
);
void
_updateWizardMode
(
void
);
private:
void
_setCameraShots
(
int
cameraShots
);
...
...
src/MissionManager/SurveyComplexItem.cc
View file @
f711da24
...
...
@@ -99,6 +99,9 @@ SurveyComplexItem::SurveyComplexItem(PlanMasterController* masterController, boo
connect
(
&
_splitConcavePolygonsFact
,
&
Fact
::
valueChanged
,
this
,
&
SurveyComplexItem
::
_rebuildTransects
);
connect
(
this
,
&
SurveyComplexItem
::
refly90DegreesChanged
,
this
,
&
SurveyComplexItem
::
_rebuildTransects
);
connect
(
&
_surveyAreaPolygon
,
&
QGCMapPolygon
::
isValidChanged
,
this
,
&
SurveyComplexItem
::
_updateWizardMode
);
connect
(
&
_surveyAreaPolygon
,
&
QGCMapPolygon
::
traceModeChanged
,
this
,
&
SurveyComplexItem
::
_updateWizardMode
);
// FIXME: Shouldn't these be in TransectStyleComplexItem? They are also in CorridorScanComplexItem constructur
connect
(
&
_cameraCalc
,
&
CameraCalc
::
distanceToSurfaceRelativeChanged
,
this
,
&
SurveyComplexItem
::
coordinateHasRelativeAltitudeChanged
);
connect
(
&
_cameraCalc
,
&
CameraCalc
::
distanceToSurfaceRelativeChanged
,
this
,
&
SurveyComplexItem
::
exitCoordinateHasRelativeAltitudeChanged
);
...
...
@@ -1428,3 +1431,10 @@ double SurveyComplexItem::additionalTimeDelay (void) const
return
hoverTime
;
}
void
SurveyComplexItem
::
_updateWizardMode
(
void
)
{
if
(
_surveyAreaPolygon
.
isValid
()
&&
!
_surveyAreaPolygon
.
traceMode
())
{
setWizardMode
(
false
);
}
}
src/MissionManager/SurveyComplexItem.h
View file @
f711da24
...
...
@@ -80,10 +80,12 @@ signals:
void
refly90DegreesChanged
(
bool
refly90Degrees
);
private
slots
:
void
_updateWizardMode
(
void
);
// Overrides from TransectStyleComplexItem
void
_rebuildTransectsPhase1
(
void
)
final
;
void
_recalcComplexDistance
(
void
)
final
;
void
_recalcCameraShots
(
void
)
final
;
void
_rebuildTransectsPhase1
(
void
)
final
;
void
_recalcComplexDistance
(
void
)
final
;
void
_recalcCameraShots
(
void
)
final
;
private:
enum
CameraTriggerCode
{
...
...
src/PlanView/CorridorScanEditor.qml
View file @
f711da24
...
...
@@ -68,15 +68,19 @@ Rectangle {
text
:
qsTr
(
"
Use the Polyline Tools to create the polyline which defines the corridor.
"
)
}
/*
Trial of new "done" model so leaving for now in case it comes back
QGCButton {
text: qsTr("Done With Polyline")
Layout.fillWidth: true
enabled: missionItem.corridorPolyline.isValid && !missionItem.corridorPolyline.traceMode
onClicked: {
missionItem.wizardMode = false
editorRoot
.
selectNextNotReadyItem
()
// Trial of no auto select next item
//editorRoot.selectNextNotReadyItem()
}
}
*/
}
Column
{
...
...
src/PlanView/FWLandingPatternEditor.qml
View file @
f711da24
...
...
@@ -312,12 +312,13 @@ Rectangle {
}
QGCButton
{
text
:
qsTr
(
"
Done
Adjusting
"
)
text
:
qsTr
(
"
Done
"
)
Layout.fillWidth
:
true
onClicked
:
{
missionItem
.
wizardMode
=
false
missionItem
.
landingDragAngleOnly
=
false
editorRoot
.
selectNextNotReadyItem
()
// Trial of no auto select next item
//editorRoot.selectNextNotReadyItem()
}
}
}
...
...
src/PlanView/MissionItemEditor.qml
View file @
f711da24
...
...
@@ -20,7 +20,7 @@ Rectangle {
color
:
_currentItem
?
qgcPal
.
missionItemEditor
:
qgcPal
.
windowShade
radius
:
_radius
opacity
:
_currentItem
?
1.0
:
0.7
border.width
:
_readyForSave
?
0
:
1
border.width
:
_readyForSave
?
0
:
2
border.color
:
qgcPal
.
warningText
property
var
map
///< Map control
...
...
@@ -87,7 +87,7 @@ Rectangle {
Rectangle
{
id
:
notReadyForSaveIndicator
anchors.verticalCenter
:
parent
.
verticalCenter
width
:
readyForSaveLabel
.
contentHeight
width
:
_hamburgerSize
height
:
width
border.width
:
1
border.color
:
qgcPal
.
warningText
...
...
src/PlanView/SimpleItemEditor.qml
View file @
f711da24
...
...
@@ -91,12 +91,13 @@ Rectangle {
}
QGCButton
{
text
:
qsTr
(
"
Done
Adjusting
"
)
text
:
qsTr
(
"
Done
"
)
Layout.fillWidth
:
true
visible
:
!
initialClickLabel
.
visible
onClicked
:
{
missionItem
.
wizardMode
=
false
editorRoot
.
selectNextNotReadyItem
()
// Trial of no auto select next item
//editorRoot.selectNextNotReadyItem()
}
}
...
...
src/PlanView/StructureScanEditor.qml
View file @
f711da24
...
...
@@ -69,15 +69,19 @@ Rectangle {
text
:
qsTr
(
"
Use the Polygon Tools to create the polygon which outlines the structure.
"
)
}
/*
Trial of new "done" model so leaving for now in case it comes back
QGCButton {
text: qsTr("Done With Polygon")
Layout.fillWidth: true
enabled: missionItem.structurePolygon.isValid && !missionItem.structurePolygon.traceMode
onClicked: {
missionItem.wizardMode = false
editorRoot
.
selectNextNotReadyItem
()
// Trial of no auto select next item
//editorRoot.selectNextNotReadyItem()
}
}
*/
}
Column
{
...
...
src/PlanView/SurveyItemEditor.qml
View file @
f711da24
...
...
@@ -29,7 +29,7 @@ Rectangle {
property
var
_vehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
offlineEditingVehicle
property
real
_cameraMinTriggerInterval
:
missionItem
.
cameraCalc
.
minTriggerInterval
.
rawValue
property
bool
_polygonDone
:
false
property
string
_doneAdjusting
:
qsTr
(
"
Done
Adjusting
"
)
property
string
_doneAdjusting
:
qsTr
(
"
Done
"
)
property
bool
_presetsAvailable
:
missionItem
.
presetNames
.
length
!==
0
function
polygonCaptureStarted
()
{
...
...
@@ -77,6 +77,8 @@ Rectangle {
text
:
qsTr
(
"
Use the Polygon Tools to create the polygon which outlines your survey area.
"
)
}
/*
Trial of new "done" model so leaving for now in case it comes back
QGCButton {
text: qsTr("Done With Polygon")
Layout.fillWidth: true
...
...
@@ -84,13 +86,17 @@ Rectangle {
onClicked: {
if (!_presetsAvailable) {
missionItem.wizardMode = false
editorRoot
.
selectNextNotReadyItem
()
// Trial of no auto select next item
//editorRoot.selectNextNotReadyItem()
}
_polygonDone = true
}
}
*/
}
/*
Trial of new "done" model so leaving for now in case it comes back
ColumnLayout {
Layout.fillWidth: true
spacing: _margin
...
...
@@ -166,10 +172,12 @@ Rectangle {
enabled: missionItem.surveyAreaPolygon.isValid
onClicked: {
missionItem.wizardMode = false
editorRoot
.
selectNextNotReadyItem
()
// Trial of no auto select next item
//editorRoot.selectNextNotReadyItem()
}
}
}
*/
}
Column
{
...
...
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