Marble

GeoDataLink.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Mayank Madan <[email protected]>
4 // SPDX-FileCopyrightText: 2013 Sanjiban Bairagya <[email protected]>
5 //
6 
7 #include "GeoDataLink.h"
8 #include "GeoDataTypes.h"
9 
10 namespace Marble {
11 
12 class GeoDataLinkPrivate
13 {
14 public:
15  QString m_href;
16  GeoDataLink::RefreshMode m_refreshMode;
17  qreal m_refreshInterval;
18  GeoDataLink::ViewRefreshMode m_viewRefreshMode;
19  qreal m_viewRefreshTime;
20  qreal m_viewBoundScale;
21  QString m_viewFormat;
22  QString m_httpQuery;
23 
24  GeoDataLinkPrivate();
25 };
26 
27 GeoDataLinkPrivate::GeoDataLinkPrivate() :
28  m_href(),
29  m_refreshMode(GeoDataLink::OnChange),
30  m_refreshInterval(4.0),
31  m_viewRefreshMode(GeoDataLink::Never),
32  m_viewRefreshTime(4.0),
33  m_viewBoundScale(1.0),
34  m_viewFormat("BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]"),
35  m_httpQuery()
36 {
37  // nothing to do
38 }
39 
40 GeoDataLink::GeoDataLink() : d( new GeoDataLinkPrivate )
41 {
42  // nothing to do
43 }
44 
45 GeoDataLink::GeoDataLink( const Marble::GeoDataLink &other ) :
46  GeoDataObject( other ), d( new GeoDataLinkPrivate( *other.d ) )
47 {
48  // nothing to do
49 }
50 
51 GeoDataLink &GeoDataLink::operator=( const GeoDataLink &other )
52 {
53  GeoDataObject::operator=( other );
54  *d = *other.d;
55  return *this;
56 }
57 
58 bool GeoDataLink::operator==( const GeoDataLink& other ) const
59 {
60  return equals(other) &&
61  d->m_href == other.d->m_href &&
62  d->m_refreshMode == other.d->m_refreshMode &&
63  d->m_refreshInterval == other.d->m_refreshInterval &&
64  d->m_viewRefreshMode == other.d->m_viewRefreshMode &&
65  d->m_viewRefreshTime == other.d->m_viewRefreshTime &&
66  d->m_viewBoundScale == other.d->m_viewBoundScale &&
67  d->m_viewFormat == other.d->m_viewFormat &&
68  d->m_httpQuery == other.d->m_httpQuery;
69 }
70 
71 bool GeoDataLink::operator!=( const GeoDataLink& other ) const
72 {
73  return !this->operator==(other);
74 }
75 
76 GeoDataLink::~GeoDataLink()
77 {
78  delete d;
79 }
80 
81 const char *GeoDataLink::nodeType() const
82 {
83  return GeoDataTypes::GeoDataLinkType;
84 }
85 
86 QString GeoDataLink::href() const
87 {
88  return d->m_href;
89 }
90 
91 void GeoDataLink::setHref( const QString& href )
92 {
93  d->m_href = href;
94 }
95 
96 GeoDataLink::RefreshMode GeoDataLink::refreshMode() const
97 {
98  return d->m_refreshMode;
99 }
100 
101 void GeoDataLink::setRefreshMode(RefreshMode refreshMode )
102 {
103  d->m_refreshMode = refreshMode;
104 }
105 
106 qreal GeoDataLink::refreshInterval() const
107 {
108  return d->m_refreshInterval;
109 }
110 
111 void GeoDataLink::setRefreshInterval( qreal refreshInterval)
112 {
113  d->m_refreshInterval = refreshInterval;
114 }
115 
116 GeoDataLink::ViewRefreshMode GeoDataLink::viewRefreshMode() const
117 {
118  return d->m_viewRefreshMode;
119 }
120 
121 void GeoDataLink::setViewRefreshMode(ViewRefreshMode viewRefreshMode)
122 {
123  d->m_viewRefreshMode = viewRefreshMode;
124 }
125 
126 qreal GeoDataLink::viewRefreshTime() const
127 {
128  return d->m_viewRefreshTime;
129 }
130 
131 void GeoDataLink::setViewRefreshTime(qreal viewRefreshTime)
132 {
133  d->m_viewRefreshTime = viewRefreshTime;
134 }
135 
136 qreal GeoDataLink::viewBoundScale() const
137 {
138  return d->m_viewBoundScale;
139 }
140 
141 void GeoDataLink::setViewBoundScale(qreal viewBoundScale)
142 {
143  d->m_viewBoundScale = viewBoundScale;
144 }
145 
146 QString GeoDataLink::viewFormat() const
147 {
148  return d->m_viewFormat;
149 }
150 
151 void GeoDataLink::setViewFormat(const QString &viewFormat)
152 {
153  d->m_viewFormat = viewFormat;
154 }
155 
156 QString GeoDataLink::httpQuery() const
157 {
158  return d->m_httpQuery;
159 }
160 void GeoDataLink::setHttpQuery(const QString &httpQuery)
161 {
162  d->m_httpQuery = httpQuery;
163 }
164 
165 }
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
Binds a QML item to a specific geodetic location in screen coordinates.
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.