AirspaceRestriction.cc 1.21 KB
Newer Older
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8 9 10 11
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

#include "AirspaceRestriction.h"

Gus Grubba's avatar
Gus Grubba committed
12
AirspaceRestriction::AirspaceRestriction(QString advisoryID, QColor color, QColor lineColor, float lineWidth, QObject* parent)
13
    : QObject(parent)
Gus Grubba's avatar
Gus Grubba committed
14
    , _advisoryID(advisoryID)
15
    , _color(color)
Gus Grubba's avatar
Gus Grubba committed
16 17
    , _lineColor(lineColor)
    , _lineWidth(lineWidth)
18 19 20
{
}

Gus Grubba's avatar
Gus Grubba committed
21 22
AirspacePolygonRestriction::AirspacePolygonRestriction(const QVariantList& polygon, QString advisoryID, QColor color, QColor lineColor, float lineWidth, QObject* parent)
    : AirspaceRestriction(advisoryID, color, lineColor, lineWidth, parent)
23 24 25 26 27
    , _polygon(polygon)
{

}

Gus Grubba's avatar
Gus Grubba committed
28 29
AirspaceCircularRestriction::AirspaceCircularRestriction(const QGeoCoordinate& center, double radius, QString advisoryID, QColor color, QColor lineColor, float lineWidth, QObject* parent)
    : AirspaceRestriction(advisoryID, color, lineColor, lineWidth, parent)
30 31 32 33 34 35
    , _center(center)
    , _radius(radius)
{

}