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
11class GeoDataAliasPrivate
12{
13public:
14 QString m_sourceHref;
15 QString m_targetHref;
16
17 GeoDataAliasPrivate();
18};
19
20GeoDataAliasPrivate::GeoDataAliasPrivate() :
21 m_sourceHref(), m_targetHref()
22{
23 // nothing to do
24}
25
26GeoDataAlias::GeoDataAlias() : d( new GeoDataAliasPrivate )
27{
28 // nothing to do
29}
30
31GeoDataAlias::GeoDataAlias( const Marble::GeoDataAlias &other ) :
32 GeoNode( other ), d( new GeoDataAliasPrivate( *other.d ) )
33{
34 // nothing to do
35}
36
37GeoDataAlias &GeoDataAlias::operator=( const GeoDataAlias &other )
38{
39 *d = *other.d;
40 return *this;
41}
42
43bool GeoDataAlias::operator==( const GeoDataAlias &other ) const
44{
45 return ( d->m_sourceHref == other.d->m_sourceHref ) && ( d->m_targetHref == other.d->m_targetHref );
46}
47
48bool GeoDataAlias::operator!=( const GeoDataAlias &other ) const
49{
50 return !this->operator==(other);
51}
52
53GeoDataAlias::~GeoDataAlias()
54{
55 delete d;
56}
57
58const char *GeoDataAlias::nodeType() const
59{
60 return GeoDataTypes::GeoDataAliasType;
61}
62
63QString GeoDataAlias::sourceHref() const
64{
65 return d->m_sourceHref;
66}
67
68QString GeoDataAlias::targetHref() const
69{
70 return d->m_targetHref;
71}
72
73void GeoDataAlias::setSourceHref( const QString& sourceHref )
74{
75 d->m_sourceHref = sourceHref;
76}
77
78void GeoDataAlias::setTargetHref( const QString& targetHref )
79{
80 d->m_targetHref = targetHref;
81}
82
83}
Binds a QML item to a specific geodetic location in screen coordinates.
bool operator==(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:57:57 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.