Marble

GeoDataNetworkLinkControl.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Mohammed Nafees <[email protected]>
4 //
5 
6 #include "GeoDataNetworkLinkControl.h"
7 #include "GeoDataNetworkLinkControl_p.h"
8 
9 #include "GeoDataAbstractView.h"
10 
11 namespace Marble
12 {
13 
14 GeoDataNetworkLinkControl::GeoDataNetworkLinkControl()
15  : GeoDataContainer(new GeoDataNetworkLinkControlPrivate)
16 {
17 }
18 
19 GeoDataNetworkLinkControl::GeoDataNetworkLinkControl(const GeoDataNetworkLinkControl &other)
20  : GeoDataContainer(other, new GeoDataNetworkLinkControlPrivate(*other.d_func()))
21 {
22 }
23 
24 GeoDataNetworkLinkControl &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 
35 bool 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 
69 bool GeoDataNetworkLinkControl::operator!=( const GeoDataNetworkLinkControl &other ) const
70 {
71  return !this->operator==( other );
72 }
73 
74 GeoDataNetworkLinkControl::~GeoDataNetworkLinkControl()
75 {
76 }
77 
78 GeoDataFeature * GeoDataNetworkLinkControl::clone() const
79 {
80  return new GeoDataNetworkLinkControl(*this);
81 }
82 
83 
84 const char *GeoDataNetworkLinkControl::nodeType() const
85 {
86  Q_D(const GeoDataNetworkLinkControl);
87  return GeoDataTypes::GeoDataNetworkLinkControlType;
88 }
89 
90 qreal GeoDataNetworkLinkControl::minRefreshPeriod() const
91 {
92  Q_D(const GeoDataNetworkLinkControl);
93  return d->m_minRefreshPeriod;
94 }
95 
96 void GeoDataNetworkLinkControl::setMinRefreshPeriod(qreal minRefreshPeriod )
97 {
98  Q_D(GeoDataNetworkLinkControl);
99  d->m_minRefreshPeriod = minRefreshPeriod;
100 }
101 
102 qreal GeoDataNetworkLinkControl::maxSessionLength() const
103 {
104  Q_D(const GeoDataNetworkLinkControl);
105  return d->m_maxSessionLength;
106 }
107 
108 void GeoDataNetworkLinkControl::setMaxSessionLength(qreal maxSessionLength)
109 {
110  Q_D(GeoDataNetworkLinkControl);
111  d->m_maxSessionLength = maxSessionLength;
112 }
113 
114 QString GeoDataNetworkLinkControl::cookie() const
115 {
116  Q_D(const GeoDataNetworkLinkControl);
117  return d->m_cookie;
118 }
119 
120 void GeoDataNetworkLinkControl::setCookie( const QString &cookie )
121 {
122  Q_D(GeoDataNetworkLinkControl);
123  d->m_cookie = cookie;
124 }
125 
127 {
128  Q_D(const GeoDataNetworkLinkControl);
129  return d->m_message;
130 }
131 
132 void GeoDataNetworkLinkControl::setMessage( const QString &message )
133 {
134  Q_D(GeoDataNetworkLinkControl);
135  d->m_message = message;
136 }
137 
138 QString GeoDataNetworkLinkControl::linkName() const
139 {
140  Q_D(const GeoDataNetworkLinkControl);
141  return d->m_linkName;
142 }
143 
144 void GeoDataNetworkLinkControl::setLinkName( const QString &linkName )
145 {
146  Q_D(GeoDataNetworkLinkControl);
147  d->m_linkName = linkName;
148 }
149 
150 QString GeoDataNetworkLinkControl::linkDescription() const
151 {
152  Q_D(const GeoDataNetworkLinkControl);
153  return d->m_linkDescription;
154 }
155 
156 void GeoDataNetworkLinkControl::setLinkDescription( const QString &linkDescription )
157 {
158  Q_D(GeoDataNetworkLinkControl);
159  d->m_linkDescription = linkDescription;
160 }
161 
162 QString GeoDataNetworkLinkControl::linkSnippet() const
163 {
164  Q_D(const GeoDataNetworkLinkControl);
165  return d->m_linkSnippet;
166 }
167 
168 void GeoDataNetworkLinkControl::setLinkSnippet( const QString &linkSnippet )
169 {
170  Q_D(GeoDataNetworkLinkControl);
171  d->m_linkSnippet = linkSnippet;
172 }
173 
174 int GeoDataNetworkLinkControl::maxLines() const
175 {
176  Q_D(const GeoDataNetworkLinkControl);
177  return d->m_maxLines;
178 }
179 
180 void GeoDataNetworkLinkControl::setMaxLines(int maxLines)
181 {
182  Q_D(GeoDataNetworkLinkControl);
183  d->m_maxLines = maxLines;
184 }
185 
186 QDateTime GeoDataNetworkLinkControl::expires() const
187 {
188  Q_D(const GeoDataNetworkLinkControl);
189  return d->m_expires;
190 }
191 
192 void GeoDataNetworkLinkControl::setExpires( const QDateTime &expires )
193 {
194  Q_D(GeoDataNetworkLinkControl);
195  d->m_expires = expires;
196 }
197 
198 GeoDataUpdate &GeoDataNetworkLinkControl::update()
199 {
200  Q_D(GeoDataNetworkLinkControl);
201  return d->m_update;
202 }
203 
204 const GeoDataUpdate& GeoDataNetworkLinkControl::update() const
205 {
206  Q_D(const GeoDataNetworkLinkControl);
207  return d->m_update;
208 }
209 
210 void GeoDataNetworkLinkControl::setUpdate( const GeoDataUpdate &update )
211 {
212  Q_D(GeoDataNetworkLinkControl);
213  d->m_update = update;
214 }
215 
216 GeoDataAbstractView *GeoDataNetworkLinkControl::abstractView() const
217 {
218  Q_D(const GeoDataNetworkLinkControl);
219  return d->m_abstractView;
220 }
221 
222 void GeoDataNetworkLinkControl::setAbstractView( GeoDataAbstractView *abstractView )
223 {
224  Q_D(GeoDataNetworkLinkControl);
225  d->m_abstractView = abstractView;
226  d->m_abstractView->setParent( this );
227 }
228 
229 }
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
Binds a QML item to a specific geodetic location in screen coordinates.
void update(Part *part, const QByteArray &data, qint64 dataSize)
QString message
Q_D(Todo)
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.