Marble

GeoDataResourceMap.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2013 Sanjiban Bairagya <sanjiban22393@gmail.com>
4//
5
6#include "GeoDataResourceMap.h"
7
8#include "GeoDataAlias.h"
9#include "GeoDataTypes.h"
10
11namespace Marble
12{
13
14class GeoDataResourceMapPrivate
15{
16public:
17 GeoDataAlias m_alias;
18 GeoDataResourceMapPrivate();
19};
20
21GeoDataResourceMapPrivate::GeoDataResourceMapPrivate()
22 : m_alias()
23{
24 // nothing to do
25}
26
27GeoDataResourceMap::GeoDataResourceMap()
28 : d(new GeoDataResourceMapPrivate)
29{
30 // nothing to do
31}
32
33GeoDataResourceMap::GeoDataResourceMap(const Marble::GeoDataResourceMap &other)
34 : GeoNode(other)
35 , d(new GeoDataResourceMapPrivate(*other.d))
36{
37 // nothing to do
38}
39
40GeoDataResourceMap &GeoDataResourceMap::operator=(const GeoDataResourceMap &other)
41{
42 *d = *other.d;
43 return *this;
44}
45
46bool GeoDataResourceMap::operator==(const GeoDataResourceMap &other) const
47{
48 return d->m_alias == other.d->m_alias;
49}
50
51bool GeoDataResourceMap::operator!=(const GeoDataResourceMap &other) const
52{
53 return !this->operator==(other);
54}
55
56GeoDataResourceMap::~GeoDataResourceMap()
57{
58 delete d;
59}
60
61const char *GeoDataResourceMap::nodeType() const
62{
63 return GeoDataTypes::GeoDataResourceMapType;
64}
65
66const GeoDataAlias &GeoDataResourceMap::alias() const
67{
68 return d->m_alias;
69}
70
71GeoDataAlias &GeoDataResourceMap::alias()
72{
73 return d->m_alias;
74}
75
76void GeoDataResourceMap::setAlias(const GeoDataAlias &alias)
77{
78 d->m_alias = alias;
79}
80
81QString GeoDataResourceMap::sourceHref() const
82{
83 return d->m_alias.sourceHref();
84}
85
86QString GeoDataResourceMap::targetHref() const
87{
88 return d->m_alias.targetHref();
89}
90
91void GeoDataResourceMap::setSourceHref(const QString &sourceHref)
92{
93 d->m_alias.setSourceHref(sourceHref);
94}
95
96void GeoDataResourceMap::setTargetHref(const QString &targetHref)
97{
98 d->m_alias.setTargetHref(targetHref);
99}
100
101}
KIOCORE_EXPORT bool operator==(const UDSEntry &entry, const UDSEntry &other)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.