Newer
Older
Valentin Platzgummer
committed
const char *WimaServiceAreaData::typeString = "WimaServiceAreaData";
WimaServiceAreaData::WimaServiceAreaData(QObject *parent)
: WimaAreaData(parent)
{
}
Valentin Platzgummer
committed
WimaServiceAreaData::WimaServiceAreaData(const WimaServiceAreaData &other, QObject *parent)
: WimaAreaData (parent)
{
*this = other;
}
WimaServiceAreaData::WimaServiceAreaData(const WimaServiceArea &other, QObject *parent)
: WimaAreaData (parent)
{
*this = other;
}
WimaServiceAreaData &WimaServiceAreaData::operator=(const WimaServiceAreaData &otherData)
{
this->assign(otherData);
Valentin Platzgummer
committed
return *this;
}
WimaServiceAreaData &WimaServiceAreaData::operator=(const WimaServiceArea &otherArea)
this->assign(otherArea);
Valentin Platzgummer
committed
return *this;
}
/*!
* \fn const QGeoCoordinate &WimaServiceAreaData::takeOffPosition() const
* Returns a constant reference to the takeOffPosition.
*
*/
const QGeoCoordinate &WimaServiceAreaData::takeOffPosition() const
{
return _takeOffPosition;
}
/*!
* \fn const QGeoCoordinate &WimaServiceAreaData::landOffPosition() const
* Returns a constant reference to the landOffPosition.
*
*/
Valentin Platzgummer
committed
const QGeoCoordinate &WimaServiceAreaData::landPosition() const
QString WimaServiceAreaData::type() const
{
return this->typeString;
}
/*!
* \fn void WimaServiceAreaData::setTakeOffPosition(const QGeoCoordinate &newCoordinate)
* Sets the takeoff position to the \a newCoordinate and emits the takeOffPositionChanged() signal,
* if newCoordinate differs from the member value.
*
*/
void WimaServiceAreaData::setTakeOffPosition(const QGeoCoordinate &newCoordinate)
{
if (_takeOffPosition != newCoordinate) {
_takeOffPosition = newCoordinate;
emit takeOffPositionChanged(_takeOffPosition);
}
}
/*!
* \fn void WimaServiceAreaData::setLandOffPosition(const QGeoCoordinate &newCoordinate)
* Sets the land position to the \a newCoordinate and emits the landOffPositionChanged() signal,
* if newCoordinate differs from the member value.
*
*/
Valentin Platzgummer
committed
void WimaServiceAreaData::setLandPosition(const QGeoCoordinate &newCoordinate)
{
if (_landPosition != newCoordinate) {
_landPosition = newCoordinate;
Valentin Platzgummer
committed
emit landPositionChanged(_landPosition);
void WimaServiceAreaData::assign(const WimaServiceAreaData &other)
{
WimaAreaData::assign(other);
setLandPosition(other.landPosition());
setTakeOffPosition(other.takeOffPosition());
}
void WimaServiceAreaData::assign(const WimaServiceArea &other)
{
WimaAreaData::assign(other);
setLandPosition(other.landPosition());
setTakeOffPosition(other.takeOffPosition());
}
/*!
* \class WimaAreaData::WimaServiceAreaData
* \brief Class to store and exchange data of a \c WimaServiceArea Object.
* Class to store and exchange data of a \c WimaServiceArea Object. In contrast to \c WimaServiceArea this class
* does not provied any interface to a grafical user interface, neiter it uses the QGC Fact System.
* It is designed to exchange data between the \c WimaPlaner and the \c WimaController class. And it
* is the derived from WimaAreaData.
*
* \sa WimaServiceArea, WimaAreaData
*/