6 #include "GeoDataNetworkLinkControl.h"
7 #include "GeoDataNetworkLinkControl_p.h"
9 #include "GeoDataAbstractView.h"
14 GeoDataNetworkLinkControl::GeoDataNetworkLinkControl()
15 : GeoDataContainer(new GeoDataNetworkLinkControlPrivate)
19 GeoDataNetworkLinkControl::GeoDataNetworkLinkControl(
const GeoDataNetworkLinkControl &other)
20 : GeoDataContainer(other, new GeoDataNetworkLinkControlPrivate(*other.d_func()))
24 GeoDataNetworkLinkControl &GeoDataNetworkLinkControl::operator=(
const GeoDataNetworkLinkControl &other )
27 Q_D(GeoDataNetworkLinkControl);
35 bool GeoDataNetworkLinkControl::operator==(
const GeoDataNetworkLinkControl &other )
const
37 Q_D(
const GeoDataNetworkLinkControl);
38 const GeoDataNetworkLinkControlPrivate*
const other_d = other.d_func();
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 ) {
54 if (!d->m_abstractView && !other_d->m_abstractView) {
57 if ((!d->m_abstractView && other_d->m_abstractView) ||
58 (d->m_abstractView && !other_d->m_abstractView)) {
62 if (*d->m_abstractView != *other_d->m_abstractView) {
69 bool GeoDataNetworkLinkControl::operator!=(
const GeoDataNetworkLinkControl &other )
const
74 GeoDataNetworkLinkControl::~GeoDataNetworkLinkControl()
78 GeoDataFeature * GeoDataNetworkLinkControl::clone()
const
80 return new GeoDataNetworkLinkControl(*
this);
84 const char *GeoDataNetworkLinkControl::nodeType()
const
86 Q_D(
const GeoDataNetworkLinkControl);
87 return GeoDataTypes::GeoDataNetworkLinkControlType;
90 qreal GeoDataNetworkLinkControl::minRefreshPeriod()
const
92 Q_D(
const GeoDataNetworkLinkControl);
93 return d->m_minRefreshPeriod;
96 void GeoDataNetworkLinkControl::setMinRefreshPeriod(qreal minRefreshPeriod )
98 Q_D(GeoDataNetworkLinkControl);
99 d->m_minRefreshPeriod = minRefreshPeriod;
102 qreal GeoDataNetworkLinkControl::maxSessionLength()
const
104 Q_D(
const GeoDataNetworkLinkControl);
105 return d->m_maxSessionLength;
108 void GeoDataNetworkLinkControl::setMaxSessionLength(qreal maxSessionLength)
110 Q_D(GeoDataNetworkLinkControl);
111 d->m_maxSessionLength = maxSessionLength;
114 QString GeoDataNetworkLinkControl::cookie()
const
116 Q_D(
const GeoDataNetworkLinkControl);
120 void GeoDataNetworkLinkControl::setCookie(
const QString &cookie )
122 Q_D(GeoDataNetworkLinkControl);
123 d->m_cookie = cookie;
128 Q_D(
const GeoDataNetworkLinkControl);
132 void GeoDataNetworkLinkControl::setMessage(
const QString &
message )
134 Q_D(GeoDataNetworkLinkControl);
138 QString GeoDataNetworkLinkControl::linkName()
const
140 Q_D(
const GeoDataNetworkLinkControl);
141 return d->m_linkName;
144 void GeoDataNetworkLinkControl::setLinkName(
const QString &linkName )
146 Q_D(GeoDataNetworkLinkControl);
147 d->m_linkName = linkName;
150 QString GeoDataNetworkLinkControl::linkDescription()
const
152 Q_D(
const GeoDataNetworkLinkControl);
153 return d->m_linkDescription;
156 void GeoDataNetworkLinkControl::setLinkDescription(
const QString &linkDescription )
158 Q_D(GeoDataNetworkLinkControl);
159 d->m_linkDescription = linkDescription;
162 QString GeoDataNetworkLinkControl::linkSnippet()
const
164 Q_D(
const GeoDataNetworkLinkControl);
165 return d->m_linkSnippet;
168 void GeoDataNetworkLinkControl::setLinkSnippet(
const QString &linkSnippet )
170 Q_D(GeoDataNetworkLinkControl);
171 d->m_linkSnippet = linkSnippet;
174 int GeoDataNetworkLinkControl::maxLines()
const
176 Q_D(
const GeoDataNetworkLinkControl);
177 return d->m_maxLines;
180 void GeoDataNetworkLinkControl::setMaxLines(
int maxLines)
182 Q_D(GeoDataNetworkLinkControl);
183 d->m_maxLines = maxLines;
186 QDateTime GeoDataNetworkLinkControl::expires()
const
188 Q_D(
const GeoDataNetworkLinkControl);
192 void GeoDataNetworkLinkControl::setExpires(
const QDateTime &expires )
194 Q_D(GeoDataNetworkLinkControl);
195 d->m_expires = expires;
198 GeoDataUpdate &GeoDataNetworkLinkControl::update()
200 Q_D(GeoDataNetworkLinkControl);
204 const GeoDataUpdate& GeoDataNetworkLinkControl::update()
const
206 Q_D(
const GeoDataNetworkLinkControl);
210 void GeoDataNetworkLinkControl::setUpdate(
const GeoDataUpdate &update )
212 Q_D(GeoDataNetworkLinkControl);
216 GeoDataAbstractView *GeoDataNetworkLinkControl::abstractView()
const
218 Q_D(
const GeoDataNetworkLinkControl);
219 return d->m_abstractView;
222 void GeoDataNetworkLinkControl::setAbstractView( GeoDataAbstractView *abstractView )
224 Q_D(GeoDataNetworkLinkControl);
225 d->m_abstractView = abstractView;
226 d->m_abstractView->setParent(
this );