23#include <QGeoCoordinate>
25#include "traffic/TrafficFactor_Abstract.h"
26#include "traffic/TrafficFactorData.h"
96 const QScopedPropertyUpdateGroup updateGroup;
114 const QScopedPropertyUpdateGroup updateGroup;
136 [[nodiscard]] QGeoCoordinate
coordinate()
const {
return m_coordinate.value();}
148 void setCoordinate(
const QGeoCoordinate& newCoordinate) {m_coordinate = newCoordinate;}
186 QProperty<QGeoCoordinate> m_coordinate;
Abstract base class for traffic factors.
Units::Distance hDist
Horizontal distance from own position to the traffic, at the time of report.
bool isSameFactorAs(const TrafficFactorData &data) const
Check whether a data record refers to the same factor as *this.
void replaceBy(const TrafficFactorData &data)
Replace this object by a different traffic factor.
QBindable< Units::Distance > bindableHDist()
Getter method for property with the same name.
void updateFrom(const TrafficFactorData &data)
Update this object with newer data for the same traffic factor.
Traffic factor whose distance is known, but not its bearing.
QGeoCoordinate coordinate() const
Getter method for property with the same name.
Units::Distance range
Range to the traffic — the radius of the range ring.
Units::Distance range() const
Getter method for property with the same name.
TrafficFactor_DistanceOnly(QObject *parent=nullptr)
Default constructor.
void replaceBy(const TrafficFactorData_DistanceOnly &data)
Replace this object by a different traffic factor.
QBindable< QGeoCoordinate > bindableCoordinate() const
Getter method for property with the same name.
QBindable< Units::Distance > bindableRange()
Getter method for property with the same name.
bool updateFrom(const TrafficFactorData_DistanceOnly &data)
Offer a data record to this object, for the same traffic factor.
void setCoordinate(const QGeoCoordinate &newCoordinate)
Setter function for property with the same name.
QGeoCoordinate coordinate
Center coordinate of the range ring.
Convenience class for distance computations.
Plain-data record of a traffic factor whose position is not known.
TrafficFactorData data
Position-independent data.
QGeoCoordinate coordinate
Center coordinate of the range ring where the traffic is located.