Marble

GeoDataNetworkLink.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Mayank Madan <[email protected]>
4 //
5 
6 #include "GeoDataNetworkLink.h"
7 
8 #include "GeoDataTypes.h"
9 #include "GeoDataLink.h"
10 
11 namespace Marble {
12 
13 class GeoDataNetworkLinkPrivate
14 {
15 public:
16  bool m_refreshVisibility;
17 
18  bool m_flyToView;
19 
20  GeoDataLink m_link;
21 
22  GeoDataNetworkLinkPrivate();
23 };
24 
25 GeoDataNetworkLinkPrivate::GeoDataNetworkLinkPrivate() :
26  m_refreshVisibility(false), m_flyToView(false)
27 {
28  // nothing to do
29 }
30 
31 GeoDataNetworkLink::GeoDataNetworkLink() : d( new GeoDataNetworkLinkPrivate )
32 {
33  // nothing to do
34 }
35 
36 GeoDataNetworkLink::GeoDataNetworkLink( const Marble::GeoDataNetworkLink &other ) :
37  GeoDataFeature( other ), d( new GeoDataNetworkLinkPrivate( *other.d ) )
38 {
39  // nothing to do
40 }
41 
42 GeoDataNetworkLink &GeoDataNetworkLink::operator=( const GeoDataNetworkLink &other )
43 {
44  GeoDataFeature::operator=( other );
45  *d = *other.d;
46  return *this;
47 }
48 
49 bool GeoDataNetworkLink::operator==( const GeoDataNetworkLink &other ) const
50 {
51  return equals( other) &&
52  d->m_refreshVisibility == other.d->m_refreshVisibility &&
53  d->m_link == other.d->m_link &&
54  d->m_flyToView == other.d->m_flyToView;
55 }
56 
57 bool GeoDataNetworkLink::operator!=( const GeoDataNetworkLink &other ) const
58 {
59  return !this->operator==( other );
60 }
61 
62 GeoDataNetworkLink::~GeoDataNetworkLink()
63 {
64  delete d;
65 }
66 
67 GeoDataFeature * GeoDataNetworkLink::clone() const
68 {
69  return new GeoDataNetworkLink(*this);
70 }
71 
72 
73 const char *GeoDataNetworkLink::nodeType() const
74 {
75  return GeoDataTypes::GeoDataNetworkLinkType;
76 }
77 
78 bool GeoDataNetworkLink::refreshVisibility() const
79 {
80  return d->m_refreshVisibility;
81 }
82 
83 void GeoDataNetworkLink::setRefreshVisibility( bool refreshVisibility )
84 {
85  d->m_refreshVisibility = refreshVisibility;
86 }
87 
88 bool GeoDataNetworkLink::flyToView() const
89 {
90  return d->m_flyToView;
91 }
92 
93 void GeoDataNetworkLink::setFlyToView( bool flyToView)
94 {
95  d->m_flyToView = flyToView;
96 }
97 
98 GeoDataLink &GeoDataNetworkLink::link()
99 {
100  return d->m_link;
101 }
102 
103 const GeoDataLink& GeoDataNetworkLink::link() const
104 {
105  return d->m_link;
106 }
107 
108 void GeoDataNetworkLink::setLink(const GeoDataLink &link)
109 {
110  d->m_link = link;
111 }
112 
113 }
KIOCORE_EXPORT CopyJob * link(const QList< QUrl > &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
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:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.