Commit fd63568a authored by Valentin Platzgummer's avatar Valentin Platzgummer

befor removing .orig files

parent 7e00907d
...@@ -499,7 +499,6 @@ HEADERS += \ ...@@ -499,7 +499,6 @@ HEADERS += \
src/Wima/Geometry/WimaArea.h \ src/Wima/Geometry/WimaArea.h \
src/Wima/Geometry/WimaServiceArea.h \ src/Wima/Geometry/WimaServiceArea.h \
src/Wima/Geometry/WimaTrackerPolyline.h \ src/Wima/Geometry/WimaTrackerPolyline.h \
src/Wima/WimaController.h \
src/Wima/WimaPlaner.h \ src/Wima/WimaPlaner.h \
src/Wima/Geometry/WimaMeasurementArea.h \ src/Wima/Geometry/WimaMeasurementArea.h \
src/Wima/Geometry/WimaCorridor.h \ src/Wima/Geometry/WimaCorridor.h \
...@@ -577,7 +576,6 @@ SOURCES += \ ...@@ -577,7 +576,6 @@ SOURCES += \
src/Wima/Geometry/WimaArea.cc \ src/Wima/Geometry/WimaArea.cc \
src/Wima/Geometry/WimaServiceArea.cc \ src/Wima/Geometry/WimaServiceArea.cc \
src/Wima/Geometry/WimaTrackerPolyline.cc \ src/Wima/Geometry/WimaTrackerPolyline.cc \
src/Wima/WimaController.cc \
src/Wima/WimaPlaner.cc \ src/Wima/WimaPlaner.cc \
src/Wima/Geometry/WimaMeasurementArea.cc \ src/Wima/Geometry/WimaMeasurementArea.cc \
src/Wima/Geometry/WimaCorridor.cc \ src/Wima/Geometry/WimaCorridor.cc \
......
...@@ -42,7 +42,7 @@ CircularSurvey::CircularSurvey(PlanMasterController *masterController, ...@@ -42,7 +42,7 @@ CircularSurvey::CircularSurvey(PlanMasterController *masterController,
_metaDataMap(FactMetaData::createMapFromJsonFile( _metaDataMap(FactMetaData::createMapFromJsonFile(
QStringLiteral(":/json/CircularSurvey.SettingsGroup.json"), this)), QStringLiteral(":/json/CircularSurvey.SettingsGroup.json"), this)),
_variant(settingsGroup, _metaDataMap[variantName]), _variant(settingsGroup, _metaDataMap[variantName]),
_pAreaData(std::make_shared<WimaPlanData>()), _areaData(std::make_shared<AreaData>()),
_pWorker(std::make_unique<RoutingThread>()) { _pWorker(std::make_unique<RoutingThread>()) {
Q_UNUSED(kmlOrShpFile) Q_UNUSED(kmlOrShpFile)
...@@ -59,9 +59,9 @@ CircularSurvey::CircularSurvey(PlanMasterController *masterController, ...@@ -59,9 +59,9 @@ CircularSurvey::CircularSurvey(PlanMasterController *masterController,
&CircularSurvey::calculatingChanged); &CircularSurvey::calculatingChanged);
// Register Generators. // Register Generators.
auto lg = std::make_shared<routing::LinearGenerator>(this->_pAreaData); auto lg = std::make_shared<routing::LinearGenerator>(this->_areaData);
registerGenerator(lg->name(), lg); registerGenerator(lg->name(), lg);
auto cg = std::make_shared<routing::CircularGenerator>(this->_pAreaData); auto cg = std::make_shared<routing::CircularGenerator>(this->_areaData);
registerGenerator(cg->name(), cg); registerGenerator(cg->name(), cg);
} }
...@@ -72,15 +72,15 @@ void CircularSurvey::reverse() { ...@@ -72,15 +72,15 @@ void CircularSurvey::reverse() {
this->_rebuildTransects(); this->_rebuildTransects();
} }
void CircularSurvey::setPlanData(const WimaPlanData &d) { void CircularSurvey::setPlanData(const AreaData &d) {
*this->_pAreaData = d; *this->_areaData = d;
} }
const WimaPlanData &CircularSurvey::planData() const { const AreaData &CircularSurvey::planData() const {
return *this->_pAreaData; return *this->_areaData;
} }
WimaPlanData &CircularSurvey::planData() { return *this->_pAreaData; } AreaData &CircularSurvey::planData() { return *this->_areaData; }
QStringList CircularSurvey::variantNames() const { return _variantNames; } QStringList CircularSurvey::variantNames() const { return _variantNames; }
...@@ -228,10 +228,10 @@ bool CircularSurvey::_updateWorker() { ...@@ -228,10 +228,10 @@ bool CircularSurvey::_updateWorker() {
this->_variantNames.clear(); this->_variantNames.clear();
emit variantNamesChanged(); emit variantNamesChanged();
if (this->_pAreaData->isValid()) { if (this->_areaData->isValid()) {
// Prepare data. // Prepare data.
auto origin = this->_pAreaData->origin(); auto origin = this->_areaData->origin();
origin.setAltitude(0); origin.setAltitude(0);
if (!origin.isValid()) { if (!origin.isValid()) {
qCDebug(CircularSurveyLog) qCDebug(CircularSurveyLog)
...@@ -240,7 +240,7 @@ bool CircularSurvey::_updateWorker() { ...@@ -240,7 +240,7 @@ bool CircularSurvey::_updateWorker() {
} }
// Convert safe area. // Convert safe area.
auto geoSafeArea = this->_pAreaData->joinedArea().coordinateList(); auto geoSafeArea = this->_areaData->joinedArea().coordinateList();
if (!(geoSafeArea.size() >= 3)) { if (!(geoSafeArea.size() >= 3)) {
qCDebug(CircularSurveyLog) qCDebug(CircularSurveyLog)
<< "_updateWorker(): safe area invalid." << geoSafeArea; << "_updateWorker(): safe area invalid." << geoSafeArea;
...@@ -512,7 +512,7 @@ void CircularSurvey::_recalcCameraShots() { _cameraShots = 0; } ...@@ -512,7 +512,7 @@ void CircularSurvey::_recalcCameraShots() { _cameraShots = 0; }
void CircularSurvey::_setTransects(CircularSurvey::PtrRoutingData pRoute) { void CircularSurvey::_setTransects(CircularSurvey::PtrRoutingData pRoute) {
// Store solutions. // Store solutions.
auto ori = this->_pAreaData->origin(); auto ori = this->_areaData->origin();
ori.setAltitude(0); ori.setAltitude(0);
const auto &transectsENU = pRoute->transects; const auto &transectsENU = pRoute->transects;
QVector<Variant> variantVector; QVector<Variant> variantVector;
......
...@@ -179,7 +179,7 @@ void CircularGenerator::resetReference() { ...@@ -179,7 +179,7 @@ void CircularGenerator::resetReference() {
void CircularGenerator::establishConnections() { void CircularGenerator::establishConnections() {
if (this->_d && !this->_connectionsEstablished) { if (this->_d && !this->_connectionsEstablished) {
connect(this->_d.get(), &WimaPlanData::originChanged, this, connect(this->_d.get(), &AreaData::originChanged, this,
&GeneratorBase::generatorChanged); &GeneratorBase::generatorChanged);
connect(&this->_d->measurementArea(), connect(&this->_d->measurementArea(),
&WimaMeasurementAreaData::progressChanged, this, &WimaMeasurementAreaData::progressChanged, this,
...@@ -210,7 +210,7 @@ void CircularGenerator::establishConnections() { ...@@ -210,7 +210,7 @@ void CircularGenerator::establishConnections() {
void CircularGenerator::deleteConnections() { void CircularGenerator::deleteConnections() {
if (this->_d && this->_connectionsEstablished) { if (this->_d && this->_connectionsEstablished) {
disconnect(this->_d.get(), &WimaPlanData::originChanged, this, disconnect(this->_d.get(), &AreaData::originChanged, this,
&GeneratorBase::generatorChanged); &GeneratorBase::generatorChanged);
disconnect(&this->_d->measurementArea(), disconnect(&this->_d->measurementArea(),
&WimaMeasurementAreaData::progressChanged, this, &WimaMeasurementAreaData::progressChanged, this,
......
...@@ -14,7 +14,7 @@ namespace routing { ...@@ -14,7 +14,7 @@ namespace routing {
class GeneratorBase : public QObject { class GeneratorBase : public QObject {
Q_OBJECT Q_OBJECT
public: public:
using Data = std::shared_ptr<WimaPlanData>; using Data = std::shared_ptr<AreaData>;
using Generator = std::function<bool(snake::Transects &)>; using Generator = std::function<bool(snake::Transects &)>;
explicit GeneratorBase(QObject *parent = nullptr); explicit GeneratorBase(QObject *parent = nullptr);
......
...@@ -134,7 +134,7 @@ Fact *LinearGenerator::minLength() { return &_minLength; } ...@@ -134,7 +134,7 @@ Fact *LinearGenerator::minLength() { return &_minLength; }
void LinearGenerator::establishConnections() { void LinearGenerator::establishConnections() {
if (this->_d && !this->_connectionsEstablished) { if (this->_d && !this->_connectionsEstablished) {
connect(this->_d.get(), &WimaPlanData::originChanged, this, connect(this->_d.get(), &AreaData::originChanged, this,
&GeneratorBase::generatorChanged); &GeneratorBase::generatorChanged);
connect(&this->_d->measurementArea(), connect(&this->_d->measurementArea(),
&WimaMeasurementAreaData::progressChanged, this, &WimaMeasurementAreaData::progressChanged, this,
...@@ -160,7 +160,7 @@ void LinearGenerator::establishConnections() { ...@@ -160,7 +160,7 @@ void LinearGenerator::establishConnections() {
void LinearGenerator::deleteConnections() { void LinearGenerator::deleteConnections() {
if (this->_d && this->_connectionsEstablished) { if (this->_d && this->_connectionsEstablished) {
connect(this->_d.get(), &WimaPlanData::originChanged, this, connect(this->_d.get(), &AreaData::originChanged, this,
&GeneratorBase::generatorChanged); &GeneratorBase::generatorChanged);
connect(&this->_d->measurementArea(), connect(&this->_d->measurementArea(),
&WimaMeasurementAreaData::progressChanged, this, &WimaMeasurementAreaData::progressChanged, this,
......
...@@ -21,17 +21,17 @@ class WimaBridge : public QObject { ...@@ -21,17 +21,17 @@ class WimaBridge : public QObject {
public: public:
~WimaBridge(); ~WimaBridge();
static WimaBridge *instance(); static WimaBridge *instance();
const WimaPlanData &planData() const; const AreaData &planData() const;
const QVector<int> &progress() const; const QVector<int> &progress() const;
public slots: public slots:
void setPlanData(const WimaPlanData &planData); void setPlanData(const AreaData &planData);
void setProgress(const QVector<int> &p); void setProgress(const QVector<int> &p);
signals: signals:
void planDataChanged(); void planDataChanged();
void progressChanged(); void progressChanged();
private: private:
WimaPlanData planData_; AreaData planData_;
QVector<int> progress_; QVector<int> progress_;
}; };
#include "WimaController.h"
#include "utilities.h"
#include "MissionController.h"
#include "MissionSettingsItem.h"
#include "PlanMasterController.h"
#include "QGCApplication.h"
#include "QGCLoggingCategory.h"
#include "SettingsManager.h"
#include "SimpleMissionItem.h"
#include "WimaBridge.h"
#include "WimaPlanData.h"
#include "WimaSettings.h"
#include "Snake/QNemoHeartbeat.h"
#include "Snake/QNemoProgress.h"
#include "Snake/SnakeTile.h"
#include "QVector3D"
#include <QScopedPointer>
#define CLIPPER_SCALE 1000000
#include "clipper/clipper.hpp"
#include <memory>
QGC_LOGGING_CATEGORY(WimaControllerLog, "WimaControllerLog")
template <typename T>
constexpr typename std::underlying_type<T>::type integral(T value) {
return static_cast<typename std::underlying_type<T>::type>(value);
}
#define EVENT_TIMER_INTERVAL 50 // ms
const char *WimaController::areaItemsName = "AreaItems";
const char *WimaController::settingsGroup = "WimaController";
const char *WimaController::enableWimaControllerName = "EnableWimaController";
WimaController::WimaController(QObject *parent)
: QObject(parent), _joinedArea(), _measurementArea(), _serviceArea(),
_corridor(), _planDataValid(false),
_metaDataMap(FactMetaData::createMapFromJsonFile(
QStringLiteral(":/json/WimaController.SettingsGroup.json"), this)),
_enableWimaController(settingsGroup,
_metaDataMap[enableWimaControllerName]){
// PlanData and Progress.
connect(WimaBridge::instance(), &WimaBridge::planDataChanged, this,
&WimaController::planDataChangedHandler);
connect(WimaBridge::instance(), &WimaBridge::progressChanged, this,
&WimaController::progressChangedHandler);
}
PlanMasterController *WimaController::masterController() {
return _masterController;
}
MissionController *WimaController::missionController() {
return _missionController;
}
QmlObjectListModel *WimaController::visualItems() { return &_areas; }
Fact *WimaController::enableWimaController() { return &_enableWimaController; }
void WimaController::setMasterController(PlanMasterController *masterC) {
_masterController = masterC;
emit masterControllerChanged();
}
void WimaController::setMissionController(MissionController *missionC) {
_missionController = missionC;
emit missionControllerChanged();
}
void WimaController::planDataChangedHandler() {
// reset visual items
_areas.clear();
_measurementArea = WimaMeasurementAreaData();
_serviceArea = WimaServiceAreaData();
_corridor = WimaCorridorData();
_joinedArea = WimaJoinedAreaData();
_planDataValid = false;
emit visualItemsChanged();
// Extract areas.
auto planData = WimaBridge::instance()->planData();
// Measurement Area.
if (planData.measurementArea().coordinateList().size() >= 3) {
_measurementArea = planData.measurementArea();
_areas.append(&_measurementArea);
// Service Area.
if (planData.serviceArea().coordinateList().size() >= 3) {
_serviceArea = planData.serviceArea();
_areas.append(&_serviceArea);
// Joined Area.
if (planData.joinedArea().coordinateList().size() >= 3) {
_joinedArea = planData.joinedArea();
_areas.append(&_joinedArea);
_planDataValid = true;
// Corridor.
if (planData.corridor().coordinateList().size() >= 3) {
_corridor = planData.corridor();
}
}
}
}
if (_planDataValid) {
emit visualItemsChanged();
} else {
_areas.clear();
_measurementArea = WimaMeasurementAreaData();
_serviceArea = WimaServiceAreaData();
_corridor = WimaCorridorData();
_joinedArea = WimaJoinedAreaData();
}
}
void WimaController::progressChangedHandler() {
_measurementArea.setProgress(WimaBridge::instance()->progress());
}
#pragma once
#include <QObject>
#include "QGCMapPolygon.h"
#include "QmlObjectListModel.h"
#include "Geometry/WimaCorridorData.h"
#include "Geometry/WimaJoinedAreaData.h"
#include "Geometry/WimaMeasurementAreaData.h"
#include "Geometry/WimaServiceAreaData.h"
#include "SettingsFact.h"
class MissionController;
class PlanMasterController;
class WimaController : public QObject {
Q_OBJECT
public:
WimaController(QObject *parent = nullptr);
// Controllers.
Q_PROPERTY(PlanMasterController *masterController READ masterController WRITE
setMasterController NOTIFY masterControllerChanged)
Q_PROPERTY(MissionController *missionController READ missionController WRITE
setMissionController NOTIFY missionControllerChanged)
// Wima Data.
Q_PROPERTY(QmlObjectListModel *visualItems READ visualItems NOTIFY
visualItemsChanged)
Q_PROPERTY(Fact *enableWimaController READ enableWimaController CONSTANT)
// Controllers.
PlanMasterController *masterController(void);
MissionController *missionController(void);
// Wima Data
QmlObjectListModel *visualItems(void);
QGCMapPolygon joinedArea(void) const;
// Settings facts.
Fact *enableWimaController(void);
// Property setters
void setMasterController(PlanMasterController *masterController);
void setMissionController(MissionController *missionController);
// static Members
static const char *areaItemsName;
static const char *settingsGroup;
static const char *enableWimaControllerName;
signals:
// Controllers.
void masterControllerChanged(void);
void missionControllerChanged(void);
// Wima data.
void visualItemsChanged(void);
private slots:
void planDataChangedHandler();
void progressChangedHandler();
private:
// Controllers.
PlanMasterController *_masterController;
MissionController *_missionController;
// Wima Data.
QmlObjectListModel _areas; // contains all visible areas
// joined area fromed by opArea, serArea, _corridor
WimaJoinedAreaData _joinedArea;
WimaMeasurementAreaData _measurementArea; // measurement area
WimaServiceAreaData _serviceArea; // area for supplying
WimaCorridorData _corridor; // corridor connecting opArea and serArea
bool _planDataValid;
// Settings Facts.
QMap<QString, FactMetaData *> _metaDataMap;
SettingsFact _enableWimaController; // enables or disables the wimaControler
};
#include "WimaPlanData.h" #include "WimaPlanData.h"
WimaPlanData::WimaPlanData(QObject *parent) : QObject(parent) {} AreaData::AreaData(QObject *parent) : QObject(parent) {}
WimaPlanData::WimaPlanData(const WimaPlanData &other, QObject *parent) AreaData::AreaData(const AreaData &other, QObject *parent)
: QObject(parent) { : QObject(parent) {
*this = other; *this = other;
} }
WimaPlanData &WimaPlanData::operator=(const WimaPlanData &other) { AreaData &AreaData::operator=(const AreaData &other) {
this->set(other.measurementArea()); this->set(other.measurementArea());
this->set(other.serviceArea()); this->set(other.serviceArea());
this->set(other.joinedArea()); this->set(other.joinedArea());
...@@ -16,28 +16,28 @@ WimaPlanData &WimaPlanData::operator=(const WimaPlanData &other) { ...@@ -16,28 +16,28 @@ WimaPlanData &WimaPlanData::operator=(const WimaPlanData &other) {
return *this; return *this;
} }
void WimaPlanData::set(const WimaJoinedAreaData &areaData) { void AreaData::set(const WimaJoinedAreaData &areaData) {
if (_joinedArea != areaData) { if (_joinedArea != areaData) {
_joinedArea = areaData; _joinedArea = areaData;
emit joinedAreaChanged(); emit joinedAreaChanged();
} }
} }
void WimaPlanData::set(const WimaServiceAreaData &areaData) { void AreaData::set(const WimaServiceAreaData &areaData) {
if (_serviceArea != areaData) { if (_serviceArea != areaData) {
_serviceArea = areaData; _serviceArea = areaData;
emit serviceAreaChanged(); emit serviceAreaChanged();
} }
} }
void WimaPlanData::set(const WimaCorridorData &areaData) { void AreaData::set(const WimaCorridorData &areaData) {
if (_corridor != areaData) { if (_corridor != areaData) {
_corridor = areaData; _corridor = areaData;
emit corridorChanged(); emit corridorChanged();
} }
} }
void WimaPlanData::set(const WimaMeasurementAreaData &areaData) { void AreaData::set(const WimaMeasurementAreaData &areaData) {
if (_measurementArea != areaData) { if (_measurementArea != areaData) {
_measurementArea = areaData; _measurementArea = areaData;
emit measurementAreaChanged(); emit measurementAreaChanged();
...@@ -50,28 +50,28 @@ void WimaPlanData::set(const WimaMeasurementAreaData &areaData) { ...@@ -50,28 +50,28 @@ void WimaPlanData::set(const WimaMeasurementAreaData &areaData) {
} }
} }
void WimaPlanData::set(const WimaJoinedArea &areaData) { void AreaData::set(const WimaJoinedArea &areaData) {
if (_joinedArea != areaData) { if (_joinedArea != areaData) {
_joinedArea = areaData; _joinedArea = areaData;
emit joinedAreaChanged(); emit joinedAreaChanged();
} }
} }
void WimaPlanData::set(const WimaServiceArea &areaData) { void AreaData::set(const WimaServiceArea &areaData) {
if (_serviceArea != areaData) { if (_serviceArea != areaData) {
_serviceArea = areaData; _serviceArea = areaData;
emit serviceAreaChanged(); emit serviceAreaChanged();
} }
} }
void WimaPlanData::set(const WimaCorridor &areaData) { void AreaData::set(const WimaCorridor &areaData) {
if (_corridor != areaData) { if (_corridor != areaData) {
_corridor = areaData; _corridor = areaData;
emit corridorChanged(); emit corridorChanged();
} }
} }
void WimaPlanData::set(const WimaMeasurementArea &areaData) { void AreaData::set(const WimaMeasurementArea &areaData) {
if (_measurementArea != areaData) { if (_measurementArea != areaData) {
_measurementArea = areaData; _measurementArea = areaData;
emit measurementAreaChanged(); emit measurementAreaChanged();
...@@ -84,52 +84,52 @@ void WimaPlanData::set(const WimaMeasurementArea &areaData) { ...@@ -84,52 +84,52 @@ void WimaPlanData::set(const WimaMeasurementArea &areaData) {
} }
} }
void WimaPlanData::clear() { *this = WimaPlanData(); } void AreaData::clear() { *this = AreaData(); }
QGeoCoordinate WimaPlanData::origin() { return _origin; } QGeoCoordinate AreaData::origin() { return _origin; }
bool WimaPlanData::isValid() { bool AreaData::isValid() {
return _measurementArea.coordinateList().size() >= 3 && return _measurementArea.coordinateList().size() >= 3 &&
_serviceArea.coordinateList().size() >= 3 && _origin.isValid(); _serviceArea.coordinateList().size() >= 3 && _origin.isValid();
} }
const WimaJoinedAreaData &WimaPlanData::joinedArea() const { const WimaJoinedAreaData &AreaData::joinedArea() const {
return this->_joinedArea; return this->_joinedArea;
} }
const WimaServiceAreaData &WimaPlanData::serviceArea() const { const WimaServiceAreaData &AreaData::serviceArea() const {
return this->_serviceArea; return this->_serviceArea;
} }
const WimaCorridorData &WimaPlanData::corridor() const { const WimaCorridorData &AreaData::corridor() const {
return this->_corridor; return this->_corridor;
} }
const WimaMeasurementAreaData &WimaPlanData::measurementArea() const { const WimaMeasurementAreaData &AreaData::measurementArea() const {
return this->_measurementArea; return this->_measurementArea;
} }
WimaJoinedAreaData &WimaPlanData::joinedArea() { return this->_joinedArea; } WimaJoinedAreaData &AreaData::joinedArea() { return this->_joinedArea; }
WimaServiceAreaData &WimaPlanData::serviceArea() { return this->_serviceArea; } WimaServiceAreaData &AreaData::serviceArea() { return this->_serviceArea; }
WimaCorridorData &WimaPlanData::corridor() { return this->_corridor; } WimaCorridorData &AreaData::corridor() { return this->_corridor; }
WimaMeasurementAreaData &WimaPlanData::measurementArea() { WimaMeasurementAreaData &AreaData::measurementArea() {
return this->_measurementArea; return this->_measurementArea;
} }
bool WimaPlanData::operator==(const WimaPlanData &other) const { bool AreaData::operator==(const AreaData &other) const {
return this->_joinedArea == other._joinedArea && return this->_joinedArea == other._joinedArea &&
this->_measurementArea == other._measurementArea && this->_measurementArea == other._measurementArea &&
this->_corridor == other._corridor && this->_corridor == other._corridor &&
this->_serviceArea == other._serviceArea; this->_serviceArea == other._serviceArea;
} }
bool WimaPlanData::operator!=(const WimaPlanData &other) const { bool AreaData::operator!=(const AreaData &other) const {
return !(*this == other); return !(*this == other);
} }
void WimaPlanData::setOrigin(const QGeoCoordinate &origin) { void AreaData::setOrigin(const QGeoCoordinate &origin) {
if (this->_origin != origin) { if (this->_origin != origin) {
this->_origin = origin; this->_origin = origin;
emit originChanged(); emit originChanged();
......
...@@ -783,7 +783,7 @@ void WimaPlaner::updatePolygonInteractivity(int index) { ...@@ -783,7 +783,7 @@ void WimaPlaner::updatePolygonInteractivity(int index) {
void WimaPlaner::synchronize() { void WimaPlaner::synchronize() {
if (readyForSynchronization()) { if (readyForSynchronization()) {
WimaPlanData planData; AreaData planData;
if (toPlanData(planData)) { if (toPlanData(planData)) {
WimaBridge::instance()->setPlanData(planData); WimaBridge::instance()->setPlanData(planData);
setSynchronized(true); setSynchronized(true);
...@@ -926,11 +926,11 @@ void WimaPlaner::setInteractive() { ...@@ -926,11 +926,11 @@ void WimaPlaner::setInteractive() {
* *
* \sa WimaController, WimaPlanData * \sa WimaController, WimaPlanData
*/ */
bool WimaPlaner::toPlanData(WimaPlanData &planData) { bool WimaPlaner::toPlanData(AreaData &planData) {
planData.set(_measurementArea); planData.append(_measurementArea);
planData.set(_serviceArea); planData.append(_serviceArea);
planData.set(_corridor); planData.append(_corridor);
planData.set(_joinedArea); planData.append(_joinedArea);
return planData.isValid(); return planData.isValid();
} }
......
...@@ -153,7 +153,7 @@ signals: ...@@ -153,7 +153,7 @@ signals:
private: private:
// Member Functions // Member Functions
bool toPlanData(WimaPlanData &planData); bool toPlanData(AreaData &planData);
bool shortestPath(const QGeoCoordinate &start, bool shortestPath(const QGeoCoordinate &start,
const QGeoCoordinate &destination, const QGeoCoordinate &destination,
QVector<QGeoCoordinate> &path); QVector<QGeoCoordinate> &path);
......
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