|
QGroundControl
Ground Control Station for MAVLink Drones
|
Functions | |
| QJsonDocument | _loadFile (const QString &filePath, QString &errorString) |
| QVariantList | _extractShapeValues (const QVariantList &values) |
| void | _extractShapeValuesRecursive (const QVariant &value, QVariantList &shapes, int depth=0) |
| ShapeFileHelper::ShapeType | determineShapeType (const QString &filePath, QString &errorString) |
| bool | loadPolygonFromFile (const QString &filePath, QList< QGeoCoordinate > &vertices, QString &errorString) |
| bool | loadPolylineFromFile (const QString &filePath, QList< QGeoCoordinate > &coords, QString &errorString) |
| bool | loadGeoJsonCoordinate (const QJsonValue &jsonValue, bool altitudeRequired, QGeoCoordinate &coordinate, QString &errorString) |
| returned error string if load failure | |
| void | saveGeoJsonCoordinate (const QGeoCoordinate &coordinate, bool writeAltitude, QJsonValue &jsonValue) |
| json value to save to | |
Variables | |
| constexpr int | _maxRecursionDepth = 32 |
| constexpr const char * | _errorPrefix = QT_TR_NOOP("GeoJson file load failed. %1") |
| QVariantList GeoJsonHelper::_extractShapeValues | ( | const QVariantList & | values | ) |
Definition at line 49 of file GeoJsonHelper.cc.
References _extractShapeValuesRecursive().
Referenced by determineShapeType(), loadPolygonFromFile(), and loadPolylineFromFile().
| void GeoJsonHelper::_extractShapeValuesRecursive | ( | const QVariant & | value, |
| QVariantList & | shapes, | ||
| int | depth = 0 |
||
| ) |
Definition at line 26 of file GeoJsonHelper.cc.
References _extractShapeValuesRecursive(), and _maxRecursionDepth.
Referenced by _extractShapeValues(), and _extractShapeValuesRecursive().
| QJsonDocument GeoJsonHelper::_loadFile | ( | const QString & | filePath, |
| QString & | errorString | ||
| ) |
Definition at line 58 of file GeoJsonHelper.cc.
References _errorPrefix, errorString, and JsonParsing::isJsonFile().
Referenced by determineShapeType(), loadPolygonFromFile(), and loadPolylineFromFile().
| ShapeFileHelper::ShapeType GeoJsonHelper::determineShapeType | ( | const QString & | filePath, |
| QString & | errorString | ||
| ) |
Definition at line 85 of file GeoJsonHelper.cc.
References _errorPrefix, _extractShapeValues(), _loadFile(), and errorString.
| bool GeoJsonHelper::loadGeoJsonCoordinate | ( | const QJsonValue & | jsonValue, |
| bool | altitudeRequired, | ||
| QGeoCoordinate & | coordinate, | ||
| QString & | errorString | ||
| ) |
returned error string if load failure
Loads a QGeoCoordinate Stored as array [ lon, lat, alt ]
| jsonValue | json value to load from |
| altitudeRequired | true: altitude must be specified |
| coordinate | returned QGeoCordinate |
Definition at line 207 of file GeoJsonHelper.cc.
References errorString, and JsonHelper::loadGeoCoordinate().
| bool GeoJsonHelper::loadPolygonFromFile | ( | const QString & | filePath, |
| QList< QGeoCoordinate > & | vertices, | ||
| QString & | errorString | ||
| ) |
Definition at line 125 of file GeoJsonHelper.cc.
References _errorPrefix, _extractShapeValues(), _loadFile(), and errorString.
| bool GeoJsonHelper::loadPolylineFromFile | ( | const QString & | filePath, |
| QList< QGeoCoordinate > & | coords, | ||
| QString & | errorString | ||
| ) |
Definition at line 166 of file GeoJsonHelper.cc.
References _errorPrefix, _extractShapeValues(), _loadFile(), and errorString.
| void GeoJsonHelper::saveGeoJsonCoordinate | ( | const QGeoCoordinate & | coordinate, |
| bool | writeAltitude, | ||
| QJsonValue & | jsonValue | ||
| ) |
json value to save to
Saves a QGeoCoordinate Stored as array [ lon, lat, alt ]
| coordinate | QGeoCoordinate to save |
| writeAltitude | true: write altitude to json |
Definition at line 212 of file GeoJsonHelper.cc.
References JsonHelper::saveGeoCoordinate().
|
constexpr |
Definition at line 23 of file GeoJsonHelper.cc.
Referenced by _loadFile(), determineShapeType(), loadPolygonFromFile(), and loadPolylineFromFile().
|
constexpr |
Definition at line 22 of file GeoJsonHelper.cc.
Referenced by _extractShapeValuesRecursive().