Commit e02648a3 authored by Valentin Platzgummer's avatar Valentin Platzgummer

circular survey works fine with split slow and fast rebuild

parent da286265
This diff is collapsed.
This diff is collapsed.
......@@ -28,6 +28,7 @@ public:
Q_PROPERTY(bool isInitialized READ isInitialized WRITE setIsInitialized NOTIFY isInitializedChanged)
Q_INVOKABLE void resetReference(void);
Q_INVOKABLE void comprehensiveUpdate(void); // triggers a slow recalculation of the transects
// Property setters
void setRefPoint(const QGeoCoordinate &refPt);
......@@ -88,12 +89,18 @@ signals:
private slots:
// Overrides from TransectStyleComplexItem
void _rebuildTransectsPhase1 (void) final; // do not call this function, it is called by TransectStyleComplexItem::_rebuildTransects()
void _rebuildTransectsSlow (void); // the slow version of _rebuildTransectsPhase1 which properly connects the _transects
void _rebuildTransectsPhase1 (void) final; // calls _rebuildTransectsFast or _rebuildTransectsSlow depending on _fastRecalc
void _rebuildTransectsFast (void);
void _rebuildTransectsSlow (void); // the slow version of _rebuildTransectsFast which properly connects the _transects
void _triggerSlowRecalc (void);
bool _generateTransectPath (QVector<QVector<QPointF>> &transectPath, const QPolygonF &surveyPolygon);
bool _rebuildTransectsInputCheck(QPolygonF &poly);
void _rebuildTransectsToGeo (const QVector<QPointF> &path, const QGeoCoordinate &reference);
void _recalcComplexDistance (void) final;
void _recalcCameraShots (void) final;
void _reverseTransects (void);
bool _shortestPath (const QGeoCoordinate &start, const QGeoCoordinate &destination, QVector<QGeoCoordinate> shortestPath);
bool _shortestPath (const QGeoCoordinate &start, const QGeoCoordinate &destination, QVector<QGeoCoordinate> &shortestPath);
......@@ -120,6 +127,7 @@ private:
bool _isInitialized; // indicates if the polygon and refpoint etc. are initialized, prevents reinitialisation from gui and execution of _rebuildTransectsPhase1 during init from gui
bool _reverseOnly; // if this is true _rebuildTransectsPhase1() will reverse the path only, _rebuildTransectsPhase1() resets _reverseOnly
bool _referencePointBeingChanged; // is set to true by gui, if user is changeing the reference point
bool _fastRecalc; // see _rebuildTransectsPhase1 for explanation
int _updateCounter;
int _transectsDiry;
......@@ -127,3 +135,5 @@ private:
......@@ -113,6 +113,10 @@ Item {
borderColor: "black"
interiorColor: "green"
interiorOpacity: 0.5
onDragStop: {
// Transect lines
......@@ -47,6 +47,8 @@ Item {
property real _zorderSplitHandle: QGroundControl.zOrderMapItems + 2
property real _zorderCenterHandle: QGroundControl.zOrderMapItems + 1 // Lowest such that drag or split takes precedence
signal dragStop // triggered if node or center handle was stopped dragging
function addVisuals() {
_polygonComponent = polygonComponent.createObject(mapControl)
......@@ -350,7 +352,10 @@ Item {
mapControl: _root.mapControl
z: _zorderDragHandle
visible: !_circle
onDragStop: mapPolygon.verifyClockwiseWinding()
onDragStop: {
property int polygonVertex
......@@ -495,7 +500,10 @@ Item {
z: _zorderCenterHandle
onItemCoordinateChanged: = itemCoordinate
onDragStart: mapPolygon.centerDrag = true
onDragStop: mapPolygon.centerDrag = false
onDragStop: {
mapPolygon.centerDrag = false
onClicked: menu.popupCenter()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment