QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCQGeoCoordinate.cc
Go to the documentation of this file.
1#include "QGCQGeoCoordinate.h"
2
3#include <QtQml/QQmlEngine>
4
5QGCQGeoCoordinate::QGCQGeoCoordinate(const QGeoCoordinate& coord, QObject* parent)
6 : QObject (parent)
7 , _coordinate (coord)
8 , _dirty (false)
9{
10 QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
11}
12
13void QGCQGeoCoordinate::setCoordinate(const QGeoCoordinate& coordinate)
14{
15 if (_coordinate != coordinate) {
16 _coordinate = coordinate;
17 emit coordinateChanged(coordinate);
18 setDirty(true);
19 }
20}
21
23{
24 if (_dirty != dirty) {
25 _dirty = dirty;
26 emit dirtyChanged(dirty);
27 }
28}
QGeoCoordinate coordinate READ coordinate WRITE setCoordinate NOTIFY coordinateChanged(bool dirty READ dirty WRITE setDirty NOTIFY dirtyChanged) QGeoCoordinate coordinate(void) const
QGCQGeoCoordinate(const QGeoCoordinate &coord, QObject *parent=nullptr)
void dirtyChanged(bool dirty)
void setDirty(bool dirty)
bool dirty(void) const
void setCoordinate(const QGeoCoordinate &coordinate)