Marble
9 #include "GeoDataPoint.h"
10 #include "GeoDataPoint_p.h"
13 #include "MarbleDebug.h"
14 #include "MarbleGlobal.h"
16 #include "GeoDataTypes.h"
17 #include "GeoDataLatLonAltBox.h"
23 GeoDataPoint::GeoDataPoint( qreal lon, qreal lat, qreal alt,
36 const GeoDataPointPrivate *
const otherD = other.d_func();
38 d->m_coordinates = otherD->m_coordinates;
39 d->m_latLonAltBox = otherD->m_latLonAltBox;
42 GeoDataPoint::GeoDataPoint(
const GeoDataCoordinates& other )
43 : GeoDataGeometry ( new GeoDataPointPrivate )
46 d->m_coordinates = other;
47 d->m_latLonAltBox = GeoDataLatLonAltBox(d->m_coordinates);
50 GeoDataPoint::GeoDataPoint()
51 : GeoDataGeometry( new GeoDataPointPrivate )
56 GeoDataPoint::~GeoDataPoint()
61 EnumGeometryId GeoDataPoint::geometryId()
const
63 return GeoDataPointId;
66 GeoDataGeometry *GeoDataPoint::copy()
const
68 return new GeoDataPoint(*
this);
71 bool GeoDataPoint::operator==(
const GeoDataPoint &other )
const
73 return equals(other) &&
74 coordinates() == other.coordinates();
77 bool GeoDataPoint::operator!=(
const GeoDataPoint &other )
const
79 return !this->operator==(other);
82 void GeoDataPoint::setCoordinates(
const GeoDataCoordinates &coordinates )
87 d->m_coordinates = coordinates;
88 d->m_latLonAltBox = GeoDataLatLonAltBox(d->m_coordinates);
91 const GeoDataCoordinates &GeoDataPoint::coordinates()
const
93 Q_D(
const GeoDataPoint);
94 return d->m_coordinates;
99 return GeoDataTypes::GeoDataPointType;
102 void GeoDataPoint::detach()
104 GeoDataGeometry::detach();
107 void GeoDataPoint::pack(
QDataStream& stream )
const
109 Q_D(
const GeoDataPoint);
110 d->m_coordinates.pack(stream);
117 d->m_coordinates.unpack(stream);
A 3d point representation.
A class that defines a 3D bounding box for geographic data.
A base class for all geodata features.
A Geometry object representing a 3d point.
Binds a QML item to a specific geodetic location in screen coordinates.
const char * nodeType() const override
Provides type information for downcasting a GeoData.
Unit
enum used constructor to specify the units used
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:18 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.