Commit 3dfdeec9 authored by Valentin Platzgummer's avatar Valentin Platzgummer

temp

parent f4eb1bde
......@@ -423,6 +423,7 @@ INCLUDEPATH += \
src/comm \
src/MeasurementComplexItem \
src/MeasurementComplexItem/geometry \
src/MeasurementComplexItem/nemo_interface \
src/comm/ros_bridge \
src/input \
src/lib/qmapcontrol \
......
......@@ -24,9 +24,9 @@ class MeasurementComplexItem : public ComplexMissionItem {
using PtrAreaData = AreaData *;
using PtrRoutingData = std::shared_ptr<RoutingData>;
using PtrWorker = RoutingThread *;
using Variant = QList<QGeoCoordinate>;
using Variant = QVariantList;
enum class STATE { IDLE, ROUTING, REVERT_PATH, CHANGE_VARIANT, EDITING };
enum class STATE { IDLE, ROUTING, EDITING };
public:
MeasurementComplexItem(PlanMasterController *masterController, bool flyView,
......@@ -40,15 +40,17 @@ public:
Q_PROPERTY(QStringList generatorNameList READ generatorNameList NOTIFY
generatorNameListChanged)
Q_PROPERTY(bool calculating READ calculating NOTIFY calculatingChanged)
Q_PROPERTY(bool editing READ editing NOTIFY editingChanged)
Q_PROPERTY(bool ready READ ready NOTIFY readyChanged)
Q_PROPERTY(
routing::GeneratorBase *generator READ generator NOTIFY generatorChanged)
Q_PROPERTY(int generatorIndex READ generatorIndex NOTIFY generatorChanged)
Q_PROPERTY(bool editing READ editing NOTIFY editingChanged)
Q_PROPERTY(bool editing READ editing NOTIFY editingChanged)
Q_PROPERTY(AreaData *areaData READ areaData NOTIFY areaDataChanged)
Q_PROPERTY(QVariantList visualTransectPoints READ visualTransectPoints NOTIFY
visualTransectPointsChanged)
Q_PROPERTY(QVariantList route READ route NOTIFY routeChanged)
Q_INVOKABLE void revertPath(void);
Q_INVOKABLE void reverseRoute(void);
// Overrides from ComplexMissionItem
virtual QString patternName(void) const override final;
......@@ -104,7 +106,7 @@ public:
//!
//! \brief editingStart Starts area data editing.
//!
//! Starts area data editing. Transects will not be updated bewteen a call
//! Starts area data editing. Route will not be updated bewteen a call
//! sequence of editingStart() and editingStop().
//!
void editingStart();
......@@ -112,18 +114,22 @@ public:
//! \brief editingStop Stops area editing.
//!
//! Stops area editing. Will reset area data to the state before
//! editingStart() if it is invalid. Triggers a transect update.
//! editingStart() if it is invalid. Triggers a route update.
//!
void editingStop();
// Property getters
const AreaData *areaData() const;
AreaData *areaData();
QVariantList route();
Fact *variant();
Fact *altitude();
QStringList variantNames() const;
bool calculating() const;
bool editing() const;
bool ready() const;
bool followTerrain() const;
static const char *settingsGroup;
......@@ -133,23 +139,25 @@ public:
static const QString name;
signals:
void calculatingChanged();
void variantNamesChanged();
void generatorNameListChanged();
void generatorChanged();
void calculatingChanged();
void editingChanged();
void readyChanged();
void areaDataChanged();
void routeChanged();
private slots:
// Overrides from TransectStyleComplexItem
void _update(void);
// Worker functions.
void _setTransects(PtrRoutingData pRoute);
void _storeRoutingData(PtrRoutingData pRoute);
bool _updateRoute();
void _changeVariant();
bool _updateRouteWorker();
void _changeVariantWorker();
void _reverseWorker();
void _reverseRoute();
private:
bool _setGenerator(PtrGenerator newG);
......@@ -157,12 +165,13 @@ private:
void _setAreaData(PtrAreaData data);
static bool _calculating(STATE state);
static bool _editing(STATE state);
static bool _ready(STATE state);
// Hirarcical stuff.
PlanMasterController *_masterController;
int _sequenceNumber;
bool _followTerrain;
SettingsFact *_altitude;
SettingsFact _altitude;
// State.
STATE _state;
......
#pragma once
#include "RouteMissionItem/geometry/GenericPolygonArray.h"
#include "RouteMissionItem/nemo_interface/SnakeTileLocal.h"
#include "MeasurementComplexItem//geometry/GenericPolygonArray.h"
#include "MeasurementComplexItem//nemo_interface/SnakeTileLocal.h"
#include <vector>
typedef GenericPolygonArray<SnakeTileLocal, std::vector> SnakeTilesLocal;
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