Marble

GeoDataAlias.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2013 Sanjiban Bairagya <sanjiban22393@gmail.com>
4//
5
6#include "GeoDataAlias.h"
7#include "GeoDataTypes.h"
8
9namespace Marble
10{
11
12class GeoDataAliasPrivate
13{
14public:
15 QString m_sourceHref;
16 QString m_targetHref;
17
18 GeoDataAliasPrivate();
19};
20
21GeoDataAliasPrivate::GeoDataAliasPrivate()
22 : m_sourceHref()
23 , m_targetHref()
24{
25 // nothing to do
26}
27
28GeoDataAlias::GeoDataAlias()
29 : d(new GeoDataAliasPrivate)
30{
31 // nothing to do
32}
33
34GeoDataAlias::GeoDataAlias(const Marble::GeoDataAlias &other)
35 : GeoNode(other)
36 , d(new GeoDataAliasPrivate(*other.d))
37{
38 // nothing to do
39}
40
41GeoDataAlias &GeoDataAlias::operator=(const GeoDataAlias &other)
42{
43 *d = *other.d;
44 return *this;
45}
46
47bool GeoDataAlias::operator==(const GeoDataAlias &other) const
48{
49 return (d->m_sourceHref == other.d->m_sourceHref) && (d->m_targetHref == other.d->m_targetHref);
50}
51
52bool GeoDataAlias::operator!=(const GeoDataAlias &other) const
53{
54 return !this->operator==(other);
55}
56
57GeoDataAlias::~GeoDataAlias()
58{
59 delete d;
60}
61
62const char *GeoDataAlias::nodeType() const
63{
64 return GeoDataTypes::GeoDataAliasType;
65}
66
67QString GeoDataAlias::sourceHref() const
68{
69 return d->m_sourceHref;
70}
71
72QString GeoDataAlias::targetHref() const
73{
74 return d->m_targetHref;
75}
76
77void GeoDataAlias::setSourceHref(const QString &sourceHref)
78{
79 d->m_sourceHref = sourceHref;
80}
81
82void GeoDataAlias::setTargetHref(const QString &targetHref)
83{
84 d->m_targetHref = targetHref;
85}
86
87}
bool operator==(const StyleDelim &l, const StyleDelim &r)
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 Sat Dec 21 2024 17:04:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.