Marble

GeoDataNetworkLinkControl.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2013 Mohammed Nafees <nafees.technocool@gmail.com>
4//
5
6#include "GeoDataNetworkLinkControl.h"
7#include "GeoDataNetworkLinkControl_p.h"
8
9#include "GeoDataAbstractView.h"
10
11namespace Marble
12{
13
14GeoDataNetworkLinkControl::GeoDataNetworkLinkControl()
15 : GeoDataContainer(new GeoDataNetworkLinkControlPrivate)
16{
17}
18
19GeoDataNetworkLinkControl::GeoDataNetworkLinkControl(const GeoDataNetworkLinkControl &other)
20 : GeoDataContainer(other, new GeoDataNetworkLinkControlPrivate(*other.d_func()))
21{
22}
23
24GeoDataNetworkLinkControl &GeoDataNetworkLinkControl::operator=( const GeoDataNetworkLinkControl &other )
25{
26 if (this != &other) {
27 Q_D(GeoDataNetworkLinkControl);
28 *d = *other.d_func();
29 }
30
31 return *this;
32}
33
34
35bool GeoDataNetworkLinkControl::operator==( const GeoDataNetworkLinkControl &other ) const
36{
37 Q_D(const GeoDataNetworkLinkControl);
38 const GeoDataNetworkLinkControlPrivate* const other_d = other.d_func();
39
40 if ( !GeoDataContainer::equals(other) ||
41 d->m_minRefreshPeriod != other_d->m_minRefreshPeriod ||
42 d->m_maxSessionLength != other_d->m_maxSessionLength ||
43 d->m_cookie != other_d->m_cookie ||
44 d->m_message != other_d->m_message ||
45 d->m_linkName != other_d->m_linkName ||
46 d->m_linkDescription != other_d->m_linkDescription ||
47 d->m_linkSnippet != other_d->m_linkSnippet ||
48 d->m_maxLines != other_d->m_maxLines ||
49 d->m_expires != other_d->m_expires ||
50 d->m_update != other_d->m_update ) {
51 return false;
52 }
53
54 if (!d->m_abstractView && !other_d->m_abstractView) {
55 return true;
56 }
57 if ((!d->m_abstractView && other_d->m_abstractView) ||
58 (d->m_abstractView && !other_d->m_abstractView)) {
59 return false;
60 }
61
62 if (*d->m_abstractView != *other_d->m_abstractView) {
63 return false;
64 }
65
66 return true;
67}
68
69bool GeoDataNetworkLinkControl::operator!=( const GeoDataNetworkLinkControl &other ) const
70{
71 return !this->operator==( other );
72}
73
74GeoDataNetworkLinkControl::~GeoDataNetworkLinkControl()
75{
76}
77
78GeoDataFeature * GeoDataNetworkLinkControl::clone() const
79{
80 return new GeoDataNetworkLinkControl(*this);
81}
82
83
84const char *GeoDataNetworkLinkControl::nodeType() const
85{
86 Q_D(const GeoDataNetworkLinkControl);
87 return GeoDataTypes::GeoDataNetworkLinkControlType;
88}
89
90qreal GeoDataNetworkLinkControl::minRefreshPeriod() const
91{
92 Q_D(const GeoDataNetworkLinkControl);
93 return d->m_minRefreshPeriod;
94}
95
96void GeoDataNetworkLinkControl::setMinRefreshPeriod(qreal minRefreshPeriod )
97{
98 Q_D(GeoDataNetworkLinkControl);
99 d->m_minRefreshPeriod = minRefreshPeriod;
100}
101
102qreal GeoDataNetworkLinkControl::maxSessionLength() const
103{
104 Q_D(const GeoDataNetworkLinkControl);
105 return d->m_maxSessionLength;
106}
107
108void GeoDataNetworkLinkControl::setMaxSessionLength(qreal maxSessionLength)
109{
110 Q_D(GeoDataNetworkLinkControl);
111 d->m_maxSessionLength = maxSessionLength;
112}
113
114QString GeoDataNetworkLinkControl::cookie() const
115{
116 Q_D(const GeoDataNetworkLinkControl);
117 return d->m_cookie;
118}
119
120void GeoDataNetworkLinkControl::setCookie( const QString &cookie )
121{
122 Q_D(GeoDataNetworkLinkControl);
123 d->m_cookie = cookie;
124}
125
126QString GeoDataNetworkLinkControl::message() const
127{
128 Q_D(const GeoDataNetworkLinkControl);
129 return d->m_message;
130}
131
132void GeoDataNetworkLinkControl::setMessage( const QString &message )
133{
134 Q_D(GeoDataNetworkLinkControl);
135 d->m_message = message;
136}
137
138QString GeoDataNetworkLinkControl::linkName() const
139{
140 Q_D(const GeoDataNetworkLinkControl);
141 return d->m_linkName;
142}
143
144void GeoDataNetworkLinkControl::setLinkName( const QString &linkName )
145{
146 Q_D(GeoDataNetworkLinkControl);
147 d->m_linkName = linkName;
148}
149
150QString GeoDataNetworkLinkControl::linkDescription() const
151{
152 Q_D(const GeoDataNetworkLinkControl);
153 return d->m_linkDescription;
154}
155
156void GeoDataNetworkLinkControl::setLinkDescription( const QString &linkDescription )
157{
158 Q_D(GeoDataNetworkLinkControl);
159 d->m_linkDescription = linkDescription;
160}
161
162QString GeoDataNetworkLinkControl::linkSnippet() const
163{
164 Q_D(const GeoDataNetworkLinkControl);
165 return d->m_linkSnippet;
166}
167
168void GeoDataNetworkLinkControl::setLinkSnippet( const QString &linkSnippet )
169{
170 Q_D(GeoDataNetworkLinkControl);
171 d->m_linkSnippet = linkSnippet;
172}
173
174int GeoDataNetworkLinkControl::maxLines() const
175{
176 Q_D(const GeoDataNetworkLinkControl);
177 return d->m_maxLines;
178}
179
180void GeoDataNetworkLinkControl::setMaxLines(int maxLines)
181{
182 Q_D(GeoDataNetworkLinkControl);
183 d->m_maxLines = maxLines;
184}
185
186QDateTime GeoDataNetworkLinkControl::expires() const
187{
188 Q_D(const GeoDataNetworkLinkControl);
189 return d->m_expires;
190}
191
192void GeoDataNetworkLinkControl::setExpires( const QDateTime &expires )
193{
194 Q_D(GeoDataNetworkLinkControl);
195 d->m_expires = expires;
196}
197
198GeoDataUpdate &GeoDataNetworkLinkControl::update()
199{
200 Q_D(GeoDataNetworkLinkControl);
201 return d->m_update;
202}
203
204const GeoDataUpdate& GeoDataNetworkLinkControl::update() const
205{
206 Q_D(const GeoDataNetworkLinkControl);
207 return d->m_update;
208}
209
210void GeoDataNetworkLinkControl::setUpdate( const GeoDataUpdate &update )
211{
212 Q_D(GeoDataNetworkLinkControl);
213 d->m_update = update;
214}
215
216GeoDataAbstractView *GeoDataNetworkLinkControl::abstractView() const
217{
218 Q_D(const GeoDataNetworkLinkControl);
219 return d->m_abstractView;
220}
221
222void GeoDataNetworkLinkControl::setAbstractView( GeoDataAbstractView *abstractView )
223{
224 Q_D(GeoDataNetworkLinkControl);
225 d->m_abstractView = abstractView;
226 d->m_abstractView->setParent( this );
227}
228
229}
void update(Part *part, const QByteArray &data, qint64 dataSize)
Binds a QML item to a specific geodetic location in screen coordinates.
bool operator==(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.