7#include "GeoDataModel.h"
8#include "GeoDataGeometry_p.h"
10#include "GeoDataLocation.h"
11#include "GeoDataOrientation.h"
12#include "GeoDataResourceMap.h"
13#include "GeoDataScale.h"
14#include "GeoDataTypes.h"
21class GeoDataModelPrivate :
public GeoDataGeometryPrivate
24 GeoDataModelPrivate();
26 GeoDataGeometryPrivate *copy()
const override
28 return new GeoDataModelPrivate(*
this);
31 GeoDataCoordinates m_coordinates;
34 GeoDataOrientation m_orientation;
35 GeoDataLocation m_location;
37 GeoDataResourceMap m_map;
42GeoDataModelPrivate::GeoDataModelPrivate()
54GeoDataModel::GeoDataModel()
55 : GeoDataGeometry(new GeoDataModelPrivate)
57 setAltitudeMode(ClampToGround);
60GeoDataModel::GeoDataModel(
const GeoDataModel &other)
61 : GeoDataGeometry(other)
66GeoDataModel &GeoDataModel::operator=(
const GeoDataModel &other) =
default;
68const char *GeoDataModel::nodeType()
const
70 return GeoDataTypes::GeoDataModelType;
73EnumGeometryId GeoDataModel::geometryId()
const
75 return GeoDataModelId;
78GeoDataGeometry *GeoDataModel::copy()
const
80 return new GeoDataModel(*
this);
83bool GeoDataModel::operator==(
const GeoDataModel &other)
const
85 Q_D(
const GeoDataModel);
86 const GeoDataModelPrivate *other_d = other.d_func();
88 return equals(other) && d->m_coordinates == other_d->m_coordinates && d->m_scale == other_d->m_scale && d->m_orientation == other_d->m_orientation
89 && d->m_location == other_d->m_location && d->m_link == other_d->m_link && d->m_map == other_d->m_map && d->m_targetHref == other_d->m_targetHref
90 && d->m_sourceHref == other_d->m_sourceHref;
93bool GeoDataModel::operator!=(
const GeoDataModel &other)
const
98GeoDataModel::~GeoDataModel() =
default;
100const GeoDataCoordinates &GeoDataModel::coordinates()
const
102 Q_D(
const GeoDataModel);
103 return d->m_coordinates;
106GeoDataCoordinates &GeoDataModel::coordinates()
111 return d->m_coordinates;
114const GeoDataLocation &GeoDataModel::location()
const
116 Q_D(
const GeoDataModel);
117 return d->m_location;
120GeoDataLocation &GeoDataModel::location()
125 return d->m_location;
128void GeoDataModel::setCoordinates(
const GeoDataCoordinates &coordinates)
133 d->m_coordinates = coordinates;
136void GeoDataModel::setLocation(
const GeoDataLocation &location)
144const GeoDataLink &GeoDataModel::link()
const
146 Q_D(
const GeoDataModel);
150GeoDataLink &GeoDataModel::link()
158void GeoDataModel::setLink(
const GeoDataLink &link)
166const GeoDataScale &GeoDataModel::scale()
const
168 Q_D(
const GeoDataModel);
172GeoDataScale &GeoDataModel::scale()
180void GeoDataModel::setScale(
const GeoDataScale &scale)
188const GeoDataOrientation &GeoDataModel::orientation()
const
190 Q_D(
const GeoDataModel);
191 return d->m_orientation;
194GeoDataOrientation &GeoDataModel::orientation()
199 return d->m_orientation;
202void GeoDataModel::setOrientation(
const GeoDataOrientation &orientation)
207 d->m_orientation = orientation;
210const GeoDataResourceMap &GeoDataModel::resourceMap()
const
212 Q_D(
const GeoDataModel);
216GeoDataResourceMap &GeoDataModel::resourceMap()
224void GeoDataModel::setResourceMap(
const GeoDataResourceMap &map)
232QString GeoDataModel::targetHref()
const
234 Q_D(
const GeoDataModel);
235 return d->m_map.targetHref();
238void GeoDataModel::setTargetHref(
const QString &targetHref)
243 d->m_map.setTargetHref(targetHref);
246QString GeoDataModel::sourceHref()
const
248 Q_D(
const GeoDataModel);
249 return d->m_map.sourceHref();
252void GeoDataModel::setSourceHref(
const QString &sourceHref)
257 d->m_map.setSourceHref(sourceHref);
KIOCORE_EXPORT bool operator==(const UDSEntry &entry, const UDSEntry &other)
KIOCORE_EXPORT CopyJob * link(const QList< QUrl > &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
QVariant location(const QVariant &res)
bool equals(const QVariant &lhs, const QVariant &rhs)
Binds a QML item to a specific geodetic location in screen coordinates.
QFuture< void > map(Iterator begin, Iterator end, MapFunctor &&function)