Marble

GeoDataAlias.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Sanjiban Bairagya <[email protected]>
4 //
5 
6 #include "GeoDataAlias.h"
7 #include "GeoDataTypes.h"
8 
9 namespace Marble {
10 
11 class GeoDataAliasPrivate
12 {
13 public:
14  QString m_sourceHref;
15  QString m_targetHref;
16 
17  GeoDataAliasPrivate();
18 };
19 
20 GeoDataAliasPrivate::GeoDataAliasPrivate() :
21  m_sourceHref(), m_targetHref()
22 {
23  // nothing to do
24 }
25 
26 GeoDataAlias::GeoDataAlias() : d( new GeoDataAliasPrivate )
27 {
28  // nothing to do
29 }
30 
31 GeoDataAlias::GeoDataAlias( const Marble::GeoDataAlias &other ) :
32  GeoNode( other ), d( new GeoDataAliasPrivate( *other.d ) )
33 {
34  // nothing to do
35 }
36 
37 GeoDataAlias &GeoDataAlias::operator=( const GeoDataAlias &other )
38 {
39  *d = *other.d;
40  return *this;
41 }
42 
43 bool 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 
48 bool GeoDataAlias::operator!=( const GeoDataAlias &other ) const
49 {
50  return !this->operator==(other);
51 }
52 
53 GeoDataAlias::~GeoDataAlias()
54 {
55  delete d;
56 }
57 
58 const char *GeoDataAlias::nodeType() const
59 {
60  return GeoDataTypes::GeoDataAliasType;
61 }
62 
63 QString GeoDataAlias::sourceHref() const
64 {
65  return d->m_sourceHref;
66 }
67 
68 QString GeoDataAlias::targetHref() const
69 {
70  return d->m_targetHref;
71 }
72 
73 void GeoDataAlias::setSourceHref( const QString& sourceHref )
74 {
75  d->m_sourceHref = sourceHref;
76 }
77 
78 void GeoDataAlias::setTargetHref( const QString& targetHref )
79 {
80  d->m_targetHref = targetHref;
81 }
82 
83 }
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.