6#include "GeoDataCamera.h"
7#include "GeoDataCamera_p.h"
9#include "GeoDataTypes.h"
16GeoDataCamera::GeoDataCamera()
17 : GeoDataAbstractView()
18 , d(new GeoDataCameraPrivate)
22GeoDataCamera::GeoDataCamera(
const GeoDataCamera &other)
23 : GeoDataAbstractView()
29GeoDataCamera &GeoDataCamera::operator=(
const GeoDataCamera &other)
31 GeoDataAbstractView::operator=(other);
32 qAtomicAssign(d, other.d);
36bool GeoDataCamera::operator==(
const GeoDataCamera &other)
const
38 return equals(other) && d->m_coordinates == other.d->m_coordinates && d->m_roll == other.d->m_roll && d->m_heading == other.d->m_heading
39 && d->m_tilt == other.d->m_tilt && altitudeMode() == other.altitudeMode();
42bool GeoDataCamera::operator!=(
const GeoDataCamera &other)
const
47GeoDataCamera::~GeoDataCamera()
49 if (!d->ref.deref()) {
54GeoDataAbstractView *GeoDataCamera::copy()
const
56 return new GeoDataCamera(*
this);
59void GeoDataCamera::setCoordinates(
const GeoDataCoordinates &coordinates)
62 d->m_coordinates = coordinates;
65const char *GeoDataCamera::nodeType()
const
67 return GeoDataTypes::GeoDataCameraType;
70void GeoDataCamera::setAltitude(qreal altitude)
73 d->m_coordinates.setAltitude(altitude);
76qreal GeoDataCamera::altitude()
const
78 return d->m_coordinates.altitude();
81void GeoDataCamera::setLatitude(qreal latitude, GeoDataCoordinates::Unit unit)
84 d->m_coordinates.setLatitude(latitude, unit);
87qreal GeoDataCamera::latitude(GeoDataCoordinates::Unit unit)
const
89 return d->m_coordinates.latitude(unit);
92void GeoDataCamera::setLongitude(qreal longitude, GeoDataCoordinates::Unit unit)
95 d->m_coordinates.setLongitude(longitude, unit);
98qreal GeoDataCamera::longitude(GeoDataCoordinates::Unit unit)
const
100 return d->m_coordinates.longitude(unit);
103GeoDataCoordinates GeoDataCamera::coordinates()
const
105 return d->m_coordinates;
108void GeoDataCamera::setRoll(qreal roll)
114qreal GeoDataCamera::roll()
const
119qreal GeoDataCamera::heading()
const
124void GeoDataCamera::setHeading(qreal heading)
127 d->m_heading = heading;
130qreal GeoDataCamera::tilt()
const
135void GeoDataCamera::setTilt(qreal tilt)
141void GeoDataCamera::detach()
QAction * roll(const QObject *recvr, const char *slot, QObject *parent)
bool equals(const QVariant &lhs, const QVariant &rhs)
bool operator==(const StyleDelim &l, const StyleDelim &r)
Binds a QML item to a specific geodetic location in screen coordinates.