Marble

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