Marble
6 #include "GeoDataVec2.h"
8 #include "MarbleDebug.h"
12 class GeoDataVec2Private
17 GeoDataVec2::Unit m_xunit;
18 GeoDataVec2::Unit m_yunit;
20 static GeoDataVec2::Unit parseUnits(
const QString &value );
23 GeoDataVec2Private::GeoDataVec2Private() :
24 m_xunit(GeoDataVec2::Fraction), m_yunit(GeoDataVec2::Fraction)
28 GeoDataVec2::GeoDataVec2() :
29 d( new GeoDataVec2Private )
33 GeoDataVec2::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 );
42 GeoDataVec2::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;
58 GeoDataVec2::GeoDataVec2(
const Marble::GeoDataVec2 &other ) :
59 QPointF(other), d( new GeoDataVec2Private( *other.d ) )
63 GeoDataVec2 &GeoDataVec2::operator=(
const GeoDataVec2 &other )
65 QPointF::operator=(other);
70 bool 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;
76 bool GeoDataVec2::operator!=(
const GeoDataVec2& other)
const
81 GeoDataVec2::~GeoDataVec2()
86 GeoDataVec2::Unit GeoDataVec2::xunit()
const
91 void GeoDataVec2::setXunits(Unit xunit)
96 GeoDataVec2::Unit GeoDataVec2::yunit()
const
101 void GeoDataVec2::setYunits(Unit yunit)
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
Binds a QML item to a specific geodetic location in screen coordinates.
QDebug mDebug()
a function to replace qDebug() in Marble library code
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:26 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.