6#include "GeoDataVec2.h"
8#include "MarbleDebug.h"
12class GeoDataVec2Private
17 GeoDataVec2::Unit m_xunit;
18 GeoDataVec2::Unit m_yunit;
20 static GeoDataVec2::Unit parseUnits(
const QString &value );
23GeoDataVec2Private::GeoDataVec2Private() :
24 m_xunit(GeoDataVec2::Fraction), m_yunit(GeoDataVec2::Fraction)
28GeoDataVec2::GeoDataVec2() :
29 d( new GeoDataVec2Private )
33GeoDataVec2::GeoDataVec2(qreal x, qreal y,
const QString &xunits,
const QString &yunits) :
34 d( new GeoDataVec2Private )
38 d->m_xunit = GeoDataVec2Private::parseUnits( xunits );
39 d->m_yunit = GeoDataVec2Private::parseUnits( yunits );
42GeoDataVec2::Unit GeoDataVec2Private::parseUnits(
const QString &value )
45 return GeoDataVec2::Fraction;
48 return GeoDataVec2::Pixels;
51 return GeoDataVec2::InsetPixels;
54 mDebug() <<
"Warning: Unknown units value " << value <<
" - falling back to default 'fraction'";
55 return GeoDataVec2::Fraction;
58GeoDataVec2::GeoDataVec2(
const Marble::GeoDataVec2 &other ) :
59 QPointF(other), d( new GeoDataVec2Private( *other.d ) )
63GeoDataVec2 &GeoDataVec2::operator=(
const GeoDataVec2 &other )
65 QPointF::operator=(other);
70bool GeoDataVec2::operator==(
const GeoDataVec2& other)
const
72 return x() == other.x() && y() == other.y() &&
73 d->m_xunit == other.d->m_xunit && d->m_yunit == other.d->m_yunit;
76bool GeoDataVec2::operator!=(
const GeoDataVec2& other)
const
81GeoDataVec2::~GeoDataVec2()
86GeoDataVec2::Unit GeoDataVec2::xunit()
const
91void GeoDataVec2::setXunits(Unit xunit)
96GeoDataVec2::Unit GeoDataVec2::yunit()
const
101void GeoDataVec2::setYunits(Unit yunit)
Binds a QML item to a specific geodetic location in screen coordinates.
bool operator==(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)