6#include "GeoDataScreenOverlay.h"
7#include "GeoDataScreenOverlay_p.h"
8#include "GeoDataTypes.h"
13GeoDataScreenOverlay::GeoDataScreenOverlay()
14 : GeoDataOverlay(new GeoDataScreenOverlayPrivate)
18GeoDataScreenOverlay::GeoDataScreenOverlay(
const Marble::GeoDataScreenOverlay &other)
19 : GeoDataOverlay(other, new GeoDataScreenOverlayPrivate(*other.d_func()))
23GeoDataScreenOverlay::~GeoDataScreenOverlay() =
default;
25GeoDataScreenOverlay &GeoDataScreenOverlay::operator=(
const GeoDataScreenOverlay &other)
28 Q_D(GeoDataScreenOverlay);
35bool GeoDataScreenOverlay::operator==(
const GeoDataScreenOverlay &other)
const
37 Q_D(
const GeoDataScreenOverlay);
38 const GeoDataScreenOverlayPrivate *
const other_d = other.d_func();
40 return equals(other) && d->m_overlayXY == other_d->m_overlayXY && d->m_screenXY == other_d->m_screenXY && d->m_rotationXY == other_d->m_rotationXY
41 && d->m_size == other_d->m_size && d->m_rotation == other_d->m_rotation;
44bool GeoDataScreenOverlay::operator!=(
const GeoDataScreenOverlay &other)
const
49GeoDataFeature *GeoDataScreenOverlay::clone()
const
51 return new GeoDataScreenOverlay(*
this);
54const char *GeoDataScreenOverlay::nodeType()
const
56 return GeoDataTypes::GeoDataScreenOverlayType;
59GeoDataVec2 GeoDataScreenOverlay::overlayXY()
const
61 Q_D(
const GeoDataScreenOverlay);
62 return d->m_overlayXY;
65void GeoDataScreenOverlay::setOverlayXY(
const GeoDataVec2 &vec2)
67 Q_D(GeoDataScreenOverlay);
68 d->m_overlayXY = vec2;
71void GeoDataScreenOverlay::setOverlayXY(qreal x, qreal y, GeoDataVec2::Unit xunit, GeoDataVec2::Unit yunit)
73 Q_D(GeoDataScreenOverlay);
74 d->m_screenXY.setX(x);
75 d->m_screenXY.setY(y);
76 d->m_screenXY.setXunits(xunit);
77 d->m_screenXY.setYunits(yunit);
80GeoDataVec2 GeoDataScreenOverlay::screenXY()
const
82 Q_D(
const GeoDataScreenOverlay);
86void GeoDataScreenOverlay::setScreenXY(
const GeoDataVec2 &vec2)
88 Q_D(GeoDataScreenOverlay);
92void GeoDataScreenOverlay::setScreenXY(qreal x, qreal y, GeoDataVec2::Unit xunit, GeoDataVec2::Unit yunit)
94 Q_D(GeoDataScreenOverlay);
95 d->m_screenXY.setX(x);
96 d->m_screenXY.setY(y);
97 d->m_screenXY.setXunits(xunit);
98 d->m_screenXY.setYunits(yunit);
101GeoDataVec2 GeoDataScreenOverlay::rotationXY()
const
103 Q_D(
const GeoDataScreenOverlay);
104 return d->m_rotationXY;
107void GeoDataScreenOverlay::setRotationXY(
const GeoDataVec2 &vec2)
109 Q_D(GeoDataScreenOverlay);
110 d->m_rotationXY = vec2;
113void GeoDataScreenOverlay::setRotationXY(qreal x, qreal y, GeoDataVec2::Unit xunit, GeoDataVec2::Unit yunit)
115 Q_D(GeoDataScreenOverlay);
116 d->m_rotationXY.setX(x);
117 d->m_rotationXY.setY(y);
118 d->m_rotationXY.setXunits(xunit);
119 d->m_rotationXY.setYunits(yunit);
122GeoDataVec2 GeoDataScreenOverlay::size()
const
124 Q_D(
const GeoDataScreenOverlay);
128void GeoDataScreenOverlay::setSize(
const GeoDataVec2 &vec2)
130 Q_D(GeoDataScreenOverlay);
134void GeoDataScreenOverlay::setSize(qreal x, qreal y, GeoDataVec2::Unit xunit, GeoDataVec2::Unit yunit)
136 Q_D(GeoDataScreenOverlay);
139 d->m_size.setXunits(xunit);
140 d->m_size.setYunits(yunit);
143qreal GeoDataScreenOverlay::rotation()
const
145 Q_D(
const GeoDataScreenOverlay);
146 return d->m_rotation;
149void GeoDataScreenOverlay::setRotation(qreal rotation)
151 Q_D(GeoDataScreenOverlay);
152 d->m_rotation = rotation;
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.