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 "GeoDataTypes.h"
9#include "GeoDataLink.h"
10
11namespace Marble {
12
13class GeoDataNetworkLinkPrivate
14{
15public:
16 bool m_refreshVisibility;
17
18 bool m_flyToView;
19
20 GeoDataLink m_link;
21
22 GeoDataNetworkLinkPrivate();
23};
24
25GeoDataNetworkLinkPrivate::GeoDataNetworkLinkPrivate() :
26 m_refreshVisibility(false), m_flyToView(false)
27{
28 // nothing to do
29}
30
31GeoDataNetworkLink::GeoDataNetworkLink() : d( new GeoDataNetworkLinkPrivate )
32{
33 // nothing to do
34}
35
36GeoDataNetworkLink::GeoDataNetworkLink( const Marble::GeoDataNetworkLink &other ) :
37 GeoDataFeature( other ), d( new GeoDataNetworkLinkPrivate( *other.d ) )
38{
39 // nothing to do
40}
41
42GeoDataNetworkLink &GeoDataNetworkLink::operator=( const GeoDataNetworkLink &other )
43{
44 GeoDataFeature::operator=( other );
45 *d = *other.d;
46 return *this;
47}
48
49bool 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
57bool GeoDataNetworkLink::operator!=( const GeoDataNetworkLink &other ) const
58{
59 return !this->operator==( other );
60}
61
62GeoDataNetworkLink::~GeoDataNetworkLink()
63{
64 delete d;
65}
66
67GeoDataFeature * GeoDataNetworkLink::clone() const
68{
69 return new GeoDataNetworkLink(*this);
70}
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 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.
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 Jun 14 2024 11:54:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.