Commit 9d2ac99e authored by Valentin Platzgummer's avatar Valentin Platzgummer

generators working, wima planer still issues

parent 67cbe3f7
......@@ -195,9 +195,9 @@
<file alias="QGroundControl/Controls/ViewWidget.qml">src/ViewWidgets/ViewWidget.qml</file>
<file alias="Wima/WimaAreaNoVisual.qml">src/Wima/Snake/WimaAreaNoVisual.qml</file>
<file alias="CircularGeneratorEditor.qml">src/WimaView/CircularGeneratorEditor.qml</file>
<file alias="Wima/CircularGeneratorMapVisual.qml">src/WimaView/CircularGeneratorMapVisual.qml</file>
<file alias="QGroundControl/Controls/CircularGeneratorMapVisual.qml">src/WimaView/CircularGeneratorMapVisual.qml</file>
<file alias="CircularSurveyItemEditor.qml">src/WimaView/CircularSurveyItemEditor.qml</file>
<file alias="Wima/CircularSurveyMapVisual.qml">src/WimaView/CircularSurveyMapVisual.qml</file>
<file alias="QGroundControl/Controls/CircularSurveyMapVisual.qml">src/WimaView/CircularSurveyMapVisual.qml</file>
<file alias="Wima/CoordinateIndicator.qml">src/WimaView/CoordinateIndicator.qml</file>
<file alias="Wima/CoordinateIndicatorDrag.qml">src/WimaView/CoordinateIndicatorDrag.qml</file>
<file alias="Wima/DragCoordinate.qml">src/WimaView/DragCoordinate.qml</file>
......
......@@ -30,5 +30,9 @@ MapItemView {
object.coordinate1,
object.coordinate2,
] : []
// onParentChanged: {
// console.log("MapItemView, path:" + path)
// }
}
}
......@@ -15,7 +15,7 @@ import QtPositioning 5.3
import QGroundControl.ScreenTools 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import Wima 1.0
/// Mission item map visual
Item {
......
This diff is collapsed.
......@@ -104,7 +104,6 @@ private slots:
void _updateWorker();
void _changeVariantWorker();
void _reverseWorker();
void _storeWorker();
private:
void _appendLoadedMissionItems(QList<MissionItem *> &items,
......@@ -117,7 +116,7 @@ private:
// State.
enum class STATE {
IDLE,
STORE,
SKIPP,
REVERSE,
VARIANT_CHANGE,
RUN_CHANGE,
......@@ -137,11 +136,8 @@ private:
QStringList _generatorNameList;
PtrGenerator _pGenerator;
// Worker
PtrWorker _pWorker;
PtrRoutingData _pRoutingData; // remove this, not necessary.
// Routing data.
// Routing.
using Variant = Transects;
QVector<Variant> _variantVector;
PtrWorker _pWorker;
};
......@@ -2,7 +2,14 @@
WimaAreaData::WimaAreaData(QObject *parent) : QObject(parent) {}
WimaAreaData::~WimaAreaData() {}
WimaAreaData::WimaAreaData(const WimaAreaData &other, QObject *parent)
: QObject(parent), _path(other._path), _list(other._list),
_center(other._center) {}
WimaAreaData::WimaAreaData(const WimaArea &otherData, QObject *parent)
: QObject(parent), _center(otherData.center()) {
_setPathImpl(otherData.path());
}
bool WimaAreaData::operator==(const WimaAreaData &data) const {
return this->_path == data._path && this->_center == data._center;
......@@ -25,7 +32,7 @@ bool WimaAreaData::containsCoordinate(const QGeoCoordinate &coordinate) const {
using namespace PolygonCalculus;
using namespace GeoUtilities;
if (_path.size() > 2) {
if (this->coordinateList().size() > 2) {
QPolygonF polygon;
toCartesianList(this->coordinateList(), coordinate, polygon);
return PlanimetryCalculus::contains(polygon, QPointF(0, 0));
......@@ -36,44 +43,60 @@ bool WimaAreaData::containsCoordinate(const QGeoCoordinate &coordinate) const {
void WimaAreaData::append(const QGeoCoordinate &c) {
_list.append(c);
_path.push_back(QVariant::fromValue(c));
emit pathChanged();
}
void WimaAreaData::push_back(const QGeoCoordinate &c) { append(c); }
void WimaAreaData::clear() {
_list.clear();
_path.clear();
if (_list.size() > 0 || _path.size() > 0) {
_list.clear();
_path.clear();
emit pathChanged();
}
}
void WimaAreaData::setPath(const QVariantList &coordinateList) {
_path = coordinateList;
_list.clear();
for (auto variant : coordinateList) {
_list.push_back(variant.value<QGeoCoordinate>());
if (_path != coordinateList) {
_setPathImpl(coordinateList);
emit pathChanged();
}
}
void WimaAreaData::setCenter(const QGeoCoordinate &center) {
if (_center != center) {
_center = center;
emit centerChanged();
}
}
/*!
* \fn void WimaAreaData::assign(const WimaAreaData &other)
*
* Assigns \a other to the invoking object
*/
void WimaAreaData::assign(const WimaAreaData &other) {
setPath(other.path());
setCenter(other.center());
WimaAreaData &WimaAreaData::operator=(const WimaAreaData &otherData) {
setPath(otherData._list);
setCenter(otherData._center);
return *this;
}
void WimaAreaData::assign(const WimaArea &other) {
setPath(other.path());
setCenter(other.center());
WimaAreaData &WimaAreaData::operator=(const WimaArea &otherData) {
setPath(otherData.path());
setCenter(otherData.center());
return *this;
}
void WimaAreaData::_setPathImpl(const QList<QGeoCoordinate> &coordinateList) {
_list = coordinateList;
_path.clear();
// copy all coordinates to _path
for (const auto &vertex : coordinateList) {
_path.append(QVariant::fromValue(vertex));
}
}
void WimaAreaData::_setPathImpl(const QVariantList &coordinateList) {
_path = coordinateList;
_list.clear();
for (const auto &variant : coordinateList) {
_list.push_back(variant.value<QGeoCoordinate>());
}
}
/*!
......@@ -83,24 +106,26 @@ void WimaAreaData::assign(const WimaArea &other) {
* coordinateList. Emits the \c pathChanged() signal.
*/
void WimaAreaData::setPath(const QList<QGeoCoordinate> &coordinateList) {
_list = coordinateList;
_path.clear();
// copy all coordinates to _path
for (int i = 0; i < coordinateList.size(); i++) {
_path.append(QVariant::fromValue(coordinateList.value(i)));
if (_list != coordinateList) {
_setPathImpl(coordinateList);
emit pathChanged();
}
emit pathChanged(_path);
}
bool operator==(const WimaAreaData &m1, const WimaArea &m2) {
return m1.path() == m2.path() && m1.center() == m2.center();
}
bool operator!=(const WimaAreaData &m1, const WimaArea &m2) {
return !operator==(m1, m2);
}
bool operator==(const WimaArea &m1, const WimaAreaData &m2) { return m2 == m1; }
bool operator!=(const WimaArea &m1, const WimaAreaData &m2) {
return !operator==(m2, m1);
}
/*!
* \class WimaArea::WimaAreaData
* \brief Class to store and exchange data of a \c WimaArea Object.
......
#pragma once
#pragma once
#include <QObject>
......@@ -11,16 +11,12 @@ class WimaAreaData
{
Q_OBJECT
public:
WimaAreaData(QObject *parent = nullptr);
Q_PROPERTY(const QVariantList path READ path NOTIFY pathChanged)
Q_PROPERTY(QString type READ type CONSTANT)
Q_PROPERTY(QString mapVisualQML READ mapVisualQML CONSTANT)
WimaAreaData(QObject *parent = nullptr);
~WimaAreaData();
WimaAreaData(const WimaAreaData &otherData) = delete; // avoid slicing
WimaAreaData &
operator=(const WimaAreaData &otherData) = delete; // avoid slicing
bool operator==(const WimaAreaData &data) const;
bool operator!=(const WimaAreaData &data) const;
......@@ -37,8 +33,8 @@ public:
void clear();
signals:
void pathChanged(const QVariantList &coordinateList);
void centerChanged(void);
void pathChanged();
void centerChanged();
public slots:
void setPath(const QList<QGeoCoordinate> &coordinateList);
......@@ -46,18 +42,21 @@ public slots:
void setCenter(const QGeoCoordinate &center);
protected:
void assign(const WimaAreaData &other);
void assign(const WimaArea &other);
WimaAreaData(const WimaAreaData &otherData, QObject *parent);
WimaAreaData(const WimaArea &otherData, QObject *parent);
WimaAreaData &operator=(const WimaAreaData &otherData);
WimaAreaData &operator=(const WimaArea &otherData);
private:
// Member Functions
void _setPathImpl(const QList<QGeoCoordinate> &coordinateList);
void _setPathImpl(const QVariantList &coordinateList);
// Member Variables
// see WimaArea.h for explanation
QVariantList _path;
mutable QList<QGeoCoordinate> _list;
mutable QVariantList _path;
QList<QGeoCoordinate> _list;
QGeoCoordinate _center;
};
bool operator==(const WimaAreaData &m1, const WimaArea &m2);
bool operator!=(const WimaAreaData &m1, const WimaArea &m2);
bool operator==(const WimaArea &m1, const WimaAreaData &m2);
bool operator!=(const WimaArea &m1, const WimaAreaData &m2);
......@@ -6,14 +6,10 @@ WimaCorridorData::WimaCorridorData(QObject *parent) : WimaAreaData(parent) {}
WimaCorridorData::WimaCorridorData(const WimaCorridorData &other,
QObject *parent)
: WimaAreaData(parent) {
*this = other;
}
: WimaAreaData(other, parent) {}
WimaCorridorData::WimaCorridorData(const WimaCorridor &other, QObject *parent)
: WimaAreaData(parent) {
*this = other;
}
: WimaAreaData(other, parent) {}
/*!
* \overload operator=()
......@@ -21,8 +17,7 @@ WimaCorridorData::WimaCorridorData(const WimaCorridor &other, QObject *parent)
* Assigns \a other to the invoking object.
*/
WimaCorridorData &WimaCorridorData::operator=(const WimaCorridorData &other) {
this->assign(other);
WimaAreaData::operator=(other);
return *this;
}
......@@ -32,8 +27,7 @@ WimaCorridorData &WimaCorridorData::operator=(const WimaCorridorData &other) {
* Assigns \a other to the invoking object.
*/
WimaCorridorData &WimaCorridorData::operator=(const WimaCorridor &other) {
this->assign(other);
WimaAreaData::operator=(other);
return *this;
}
......@@ -43,14 +37,6 @@ QString WimaCorridorData::mapVisualQML() const {
QString WimaCorridorData::type() const { return this->typeString; }
void WimaCorridorData::assign(const WimaCorridorData &corridorData) {
WimaAreaData::assign(corridorData);
}
void WimaCorridorData::assign(const WimaCorridor &corridor) {
WimaAreaData::assign(corridor);
}
/*!
* \class WimaAreaData::WimaCorridorData
* \brief Class to store and exchange data of a \c WimaCorridorData Object.
......
......@@ -23,14 +23,4 @@ public:
WimaCorridorData *Clone() const { return new WimaCorridorData(*this); }
static const char *typeString;
signals:
public slots:
protected:
void assign(const WimaCorridorData &corridorData);
void assign(const WimaCorridor &corridor);
private:
};
......@@ -7,15 +7,11 @@ WimaJoinedAreaData::WimaJoinedAreaData(QObject *parent)
WimaJoinedAreaData::WimaJoinedAreaData(const WimaJoinedAreaData &other,
QObject *parent)
: WimaAreaData(parent) {
*this = other;
}
: WimaAreaData(other, parent) {}
WimaJoinedAreaData::WimaJoinedAreaData(const WimaJoinedArea &other,
QObject *parent)
: WimaAreaData(parent) {
*this = other;
}
: WimaAreaData(other, parent) {}
/*!
* \overload operator=()
......@@ -24,8 +20,7 @@ WimaJoinedAreaData::WimaJoinedAreaData(const WimaJoinedArea &other,
*/
WimaJoinedAreaData &WimaJoinedAreaData::
operator=(const WimaJoinedAreaData &other) {
assign(other);
WimaAreaData::operator=(other);
return *this;
}
......@@ -35,7 +30,7 @@ operator=(const WimaJoinedAreaData &other) {
* Assigns \a other to the invoking object.
*/
WimaJoinedAreaData &WimaJoinedAreaData::operator=(const WimaJoinedArea &other) {
assign(other);
WimaAreaData::operator=(other);
return *this;
}
......@@ -45,14 +40,6 @@ QString WimaJoinedAreaData::mapVisualQML() const {
QString WimaJoinedAreaData::type() const { return this->typeString; }
void WimaJoinedAreaData::assign(const WimaJoinedAreaData &other) {
WimaAreaData::assign(other);
}
void WimaJoinedAreaData::assign(const WimaJoinedArea &other) {
WimaAreaData::assign(other);
}
/*!
* \class WimaAreaData::WimaJoinedAreaData
* \brief Class to store and exchange data of a \c WimaJoinedAreaData Object.
......
......@@ -24,10 +24,4 @@ public:
WimaJoinedAreaData *Clone() const { return new WimaJoinedAreaData(*this); }
static const char *typeString;
protected:
void assign(const WimaJoinedAreaData &other);
void assign(const WimaJoinedArea &other);
private:
};
......@@ -22,6 +22,7 @@ bool WimaMeasurementAreaData::
operator==(const WimaMeasurementAreaData &other) const {
return this->WimaAreaData::operator==(other) &&
this->_tileData == other.tileData() &&
this->_progress == other.progress() &&
this->center() == other.center();
}
......@@ -33,6 +34,8 @@ operator!=(const WimaMeasurementAreaData &other) const {
void WimaMeasurementAreaData::setTileData(const TileData &d) {
if (this->_tileData != d) {
this->_tileData = d;
this->_progress.fill(0, d.size());
emit progressChanged();
emit tileDataChanged();
}
}
......@@ -51,7 +54,9 @@ void WimaMeasurementAreaData::setProgress(const QVector<int> &d) {
*/
WimaMeasurementAreaData &WimaMeasurementAreaData::
operator=(const WimaMeasurementAreaData &other) {
assign(other);
WimaAreaData::operator=(other);
setTileData(other._tileData);
setProgress(other._progress);
return *this;
}
......@@ -63,7 +68,14 @@ operator=(const WimaMeasurementAreaData &other) {
*/
WimaMeasurementAreaData &WimaMeasurementAreaData::
operator=(const WimaMeasurementArea &other) {
assign(other);
WimaAreaData::operator=(other);
if (other.ready()) {
setTileData(other.tileData());
setProgress(other.progress());
} else {
qWarning() << "WimaMeasurementAreaData::operator=(): WimaMeasurementArea "
"not ready.";
}
return *this;
}
......@@ -102,23 +114,6 @@ const QVector<int> &WimaMeasurementAreaData::progress() const {
QVector<int> &WimaMeasurementAreaData::progress() { return this->_progress; }
void WimaMeasurementAreaData::assign(const WimaMeasurementAreaData &other) {
WimaAreaData::assign(other);
setTileData(other._tileData);
setProgress(other._progress);
}
void WimaMeasurementAreaData::assign(const WimaMeasurementArea &other) {
WimaAreaData::assign(other);
if (other.ready()) {
setTileData(other.tileData());
setProgress(other.progress());
} else {
qWarning()
<< "WimaMeasurementAreaData::assign(): WimaMeasurementArea not ready.";
}
}
bool operator==(const WimaMeasurementAreaData &m1,
const WimaMeasurementArea &m2) {
return operator==(*static_cast<const WimaAreaData *>(&m1),
......
......@@ -50,10 +50,6 @@ signals:
void tileDataChanged();
void progressChanged();
protected:
void assign(const WimaMeasurementAreaData &other);
void assign(const WimaMeasurementArea &other);
private:
TileData _tileData;
QVector<int> _progress;
......
......@@ -7,26 +7,22 @@ WimaServiceAreaData::WimaServiceAreaData(QObject *parent)
WimaServiceAreaData::WimaServiceAreaData(const WimaServiceAreaData &other,
QObject *parent)
: WimaAreaData(parent) {
*this = other;
}
: WimaAreaData(other, parent), _depot(other._depot) {}
WimaServiceAreaData::WimaServiceAreaData(const WimaServiceArea &other,
QObject *parent)
: WimaAreaData(parent) {
*this = other;
}
: WimaAreaData(other, parent), _depot(other.depot()) {}
WimaServiceAreaData &WimaServiceAreaData::
operator=(const WimaServiceAreaData &otherData) {
this->assign(otherData);
WimaAreaData::operator=(otherData);
this->setDepot(otherData.depot());
return *this;
}
WimaServiceAreaData &WimaServiceAreaData::
operator=(const WimaServiceArea &otherArea) {
this->assign(otherArea);
WimaAreaData::operator=(otherArea);
this->setDepot(otherArea.depot());
return *this;
}
......@@ -57,16 +53,6 @@ void WimaServiceAreaData::setDepot(const QGeoCoordinate &newCoordinate) {
}
}
void WimaServiceAreaData::assign(const WimaServiceAreaData &other) {
WimaAreaData::assign(other);
setDepot(other.depot());
}
void WimaServiceAreaData::assign(const WimaServiceArea &other) {
WimaAreaData::assign(other);
setDepot(other.depot());
}
/*!
* \class WimaAreaData::WimaServiceAreaData
* \brief Class to store and exchange data of a \c WimaServiceArea Object.
......
......@@ -31,10 +31,6 @@ signals:
public slots:
void setDepot(const QGeoCoordinate &newCoordinate);
protected:
void assign(const WimaServiceAreaData &other);
void assign(const WimaServiceArea &other);
private:
// see WimaServieArea.h for explanation
QGeoCoordinate _depot;
......
......@@ -5,7 +5,7 @@
#include <QDebug>
#include "QGCLoggingCategory.h"
QGC_LOGGING_CATEGORY(RoutingWorkerLog, "RoutingWorkerLog")
QGC_LOGGING_CATEGORY(RoutingThreadLog, "RoutingThreadLog")
RoutingThread::RoutingThread(QObject *parent)
: QThread(parent), _calculating(false), _stop(false), _restart(false) {
......@@ -44,10 +44,10 @@ void RoutingThread::route(const RoutingParameter &par,
}
void RoutingThread::run() {
qCWarning(RoutingWorkerLog) << "run(): thread start.";
qCDebug(RoutingThreadLog) << "run(): thread start.";
while (!this->_stop) {
qCWarning(RoutingWorkerLog) << "run(): calculation "
"started.";
qCDebug(RoutingThreadLog) << "run(): calculation "
"started.";
// Copy input.
auto start = std::chrono::high_resolution_clock::now();
......@@ -67,8 +67,8 @@ void RoutingThread::run() {
if (generator(transectsENU)) {
// Check if generation was successful.
if (transectsENU.size() == 0) {
qCWarning(RoutingWorkerLog) << "run(): "
"not able to generate transects.";
qCDebug(RoutingThreadLog) << "run(): "
"not able to generate transects.";
} else {
// Prepare data for routing.
auto &solutionVector = pRouteData->solutionVector;
......@@ -93,24 +93,24 @@ void RoutingThread::run() {
// Check if routing was successful.
if ((!success || solutionVector.size() < 1) && !this->_restart) {
qCWarning(RoutingWorkerLog) << "run(): "
"routing failed. "
<< snakePar.errorString.c_str();
qCDebug(RoutingThreadLog) << "run(): "
"routing failed. "
<< snakePar.errorString.c_str();
} else if (this->_restart) {
qCWarning(RoutingWorkerLog) << "run(): "
"restart requested.";
qCDebug(RoutingThreadLog) << "run(): "
"restart requested.";
} else {
// Notify main thread.
emit result(pRouteData);
qCWarning(RoutingWorkerLog) << "run(): "
"concurrent update success.";
qCDebug(RoutingThreadLog) << "run(): "
"concurrent update success.";
}
}
} // end calculation
else {
qCWarning(RoutingWorkerLog) << "run(): generator() failed.";
qCDebug(RoutingThreadLog) << "run(): generator() failed.";
}
qCWarning(RoutingWorkerLog)
qCDebug(RoutingThreadLog)
<< "run(): execution time: "
<< std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now() - start)
......@@ -125,5 +125,5 @@ void RoutingThread::run() {
}
this->_restart = false;
} // main loop
qCWarning(RoutingWorkerLog) << "run(): thread end.";
qCDebug(RoutingThreadLog) << "run(): thread end.";
}
......@@ -64,14 +64,14 @@ bool CircularGenerator::get(Generator &generator) {
auto origin = this->_d->origin();
origin.setAltitude(0);
if (!origin.isValid()) {
qCWarning(CircularGeneratorLog) << "get(): origin invalid." << origin;
qCDebug(CircularGeneratorLog) << "get(): origin invalid." << origin;
return false;
}
auto ref = this->_reference;
ref.setAltitude(0);
if (!ref.isValid()) {
qCWarning(CircularGeneratorLog) << "get(): reference invalid." << ref;
qCDebug(CircularGeneratorLog) << "get(): reference invalid." << ref;
return false;
}
snake::FPoint reference;
......@@ -82,9 +82,9 @@ bool CircularGenerator::get(Generator &generator) {
if (v.isValid()) {
v.setAltitude(0);
} else {
qCWarning(CircularGeneratorLog) << "get(): measurement area invalid.";
qCDebug(CircularGeneratorLog) << "get(): measurement area invalid.";
for (const auto &w : geoPolygon) {
qCWarning(CircularGeneratorLog) << w;
qCDebug(CircularGeneratorLog) << w;
}
return false;
}
......@@ -105,21 +105,21 @@ bool CircularGenerator::get(Generator &generator) {
snake::areaToEnu(origin, tile->coordinateList(), tileENU);
pTiles->push_back(std::move(tileENU));
} else {
qCWarning(CircularGeneratorLog)
qCDebug(CircularGeneratorLog)
<< "get(): progress.size() != tiles->count().";
return false;
}
}
}
} else {
qCWarning(CircularGeneratorLog)
qCDebug(CircularGeneratorLog)
<< "get(): progress.size() != tiles->count().";
return false;
}
auto geoDepot = this->_d->serviceArea().depot();
if (!geoDepot.isValid()) {
qCWarning(CircularGeneratorLog) << "get(): depot invalid." << geoDepot;
qCDebug(CircularGeneratorLog) << "get(): depot invalid." << geoDepot;
return false;
}
snake::FPoint depot;
......@@ -142,11 +142,11 @@ bool CircularGenerator::get(Generator &generator) {
};
return true;
} else {
qCWarning(CircularGeneratorLog) << "get(): data invalid.";
qCDebug(CircularGeneratorLog) << "get(): data invalid.";
return false;
}
} else {
qCWarning(CircularGeneratorLog) << "get(): data member not set.";
qCDebug(CircularGeneratorLog) << "get(): data member not set.";
return false;
}
}
......@@ -160,22 +160,29 @@ void CircularGenerator::setReference(const QGeoCoordinate &reference) {
}
}
void CircularGenerator::resetReferenceIfInvalid() {
if (!this->_reference.isValid()) {
resetReference();
}
}
void CircularGenerator::resetReference() {
setReference(_d->measurementArea().center());
if (this->_d->measurementArea().center().isValid()) {
setReference(this->_d->measurementArea().center());
}
}
void CircularGenerator::establishConnections() {
if (this->_d && !this->_connectionsEstablished) {
connect(this->_d.get(), &WimaPlanData::measurementAreaChanged, this,
&GeneratorBase::generatorChanged);
connect(this->_d.get(), &WimaPlanData::originChanged, this,
&GeneratorBase::generatorChanged);
connect(&this->_d->measurementArea(),
&WimaMeasurementAreaData::progressChanged, this,
&GeneratorBase::generatorChanged);
connect(&this->_d->measurementArea(),
&WimaMeasurementAreaData::tileDataChanged, this,
&GeneratorBase::generatorChanged);
connect(&this->_d->measurementArea(), &WimaMeasurementAreaData::pathChanged,
this, &CircularGenerator::resetReferenceIfInvalid);
connect(&this->_d->measurementArea(), &WimaMeasurementAreaData::pathChanged,
this, &GeneratorBase::generatorChanged);
connect(&this->_d->serviceArea(), &WimaServiceAreaData::depotChanged, this,
&GeneratorBase::generatorChanged);
connect(this->distance(), &Fact::rawValueChanged, this,
......@@ -192,8 +199,6 @@ void CircularGenerator::establishConnections() {
void CircularGenerator::deleteConnections() {
if (this->_d && this->_connectionsEstablished) {
disconnect(this->_d.get(), &WimaPlanData::measurementAreaChanged, this,
&GeneratorBase::generatorChanged);
disconnect(this->_d.get(), &WimaPlanData::originChanged, this,
&GeneratorBase::generatorChanged);
disconnect(&this->_d->measurementArea