• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • geodata
  • data
GeoDataLineString.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2008-2009 Torsten Rahn <tackat@kde.org>
9 // Copyright 2009 Patrick Spendrin <ps_ml@gmx.de>
10 //
11 
12 
13 #ifndef MARBLE_GEODATALINESTRING_H
14 #define MARBLE_GEODATALINESTRING_H
15 
16 #include <QFlags>
17 #include <QVector>
18 #include <QMetaType>
19 
20 #include "MarbleGlobal.h"
21 
22 #include "geodata_export.h"
23 #include "GeoDataGeometry.h"
24 #include "GeoDataCoordinates.h"
25 #include "GeoDataLatLonAltBox.h"
26 
27 
28 namespace Marble
29 {
30 
31 class GeoDataLineStringPrivate;
32 
75 class GEODATA_EXPORT GeoDataLineString : public GeoDataGeometry
76 {
77 
78  public:
79  typedef QVector<GeoDataCoordinates>::Iterator Iterator;
80  typedef QVector<GeoDataCoordinates>::ConstIterator ConstIterator;
81  typedef QVector<GeoDataCoordinates>::const_iterator const_iterator;
82 
83 
87  explicit GeoDataLineString( TessellationFlags f = NoTessellation );
88 
89 
93  explicit GeoDataLineString( const GeoDataGeometry &other );
94 
95 
99  virtual ~GeoDataLineString();
100 
106  virtual bool isClosed() const;
107 
108 
115  bool tessellate() const;
116 
117 
126  void setTessellate( bool tessellate );
127 
128 
132  TessellationFlags tessellationFlags() const;
133 
134 
138  void setTessellationFlags( TessellationFlags f );
139 
140 
147  virtual const GeoDataLatLonAltBox& latLonAltBox() const;
148 
157  virtual qreal length( qreal planetRadius, int offset = 0 ) const;
158 
166  virtual GeoDataLineString toRangeCorrected() const;
167 
168 
178  virtual GeoDataLineString toNormalized() const;
179 
180 
190  virtual GeoDataLineString toPoleCorrected() const;
191 
192 
201  virtual QVector<GeoDataLineString*> toDateLineCorrected() const;
202 
203 
204 
205  // "Reimplementation" of QVector API
211  bool isEmpty() const;
212 
213 
217  int size() const;
218 
219 
224  GeoDataCoordinates& at( int pos );
225 
226 
231  const GeoDataCoordinates& at( int pos ) const;
232 
233 
238  GeoDataCoordinates& operator[]( int pos );
239 
240 
245  const GeoDataCoordinates& operator[]( int pos ) const;
246 
247 
252  GeoDataCoordinates& first();
253 
254 
259  const GeoDataCoordinates& first() const;
260 
261 
266  GeoDataCoordinates& last();
267 
268 
273  const GeoDataCoordinates& last() const;
274 
275 
279  void append ( const GeoDataCoordinates& position );
280 
281 
285  GeoDataLineString& operator << ( const GeoDataCoordinates& position );
286 
287 
291  GeoDataLineString& operator << ( const GeoDataLineString& lineString );
292 
293 
297  bool operator==( const GeoDataLineString &other ) const;
298  bool operator!=( const GeoDataLineString &other ) const;
299 
300 
304  QVector<GeoDataCoordinates>::Iterator begin();
305  QVector<GeoDataCoordinates>::ConstIterator begin() const;
306 
307 
311  QVector<GeoDataCoordinates>::Iterator end();
312  QVector<GeoDataCoordinates>::ConstIterator end() const;
313 
314 
318  QVector<GeoDataCoordinates>::ConstIterator constBegin() const;
319 
320 
324  QVector<GeoDataCoordinates>::ConstIterator constEnd() const;
325 
326 
330  void clear();
331 
332 
336  QVector<GeoDataCoordinates>::Iterator erase ( QVector<GeoDataCoordinates>::Iterator position );
337 
338 
342  QVector<GeoDataCoordinates>::Iterator erase ( QVector<GeoDataCoordinates>::Iterator begin,
343  QVector<GeoDataCoordinates>::Iterator end );
344 
345 
349  void remove ( int i );
350 
351 
352  // Serialization
357  virtual void pack( QDataStream& stream ) const;
358 
359 
364  virtual void unpack( QDataStream& stream );
365 
366  protected:
367  GeoDataLineString(GeoDataLineStringPrivate* priv);
368 
369  private:
370  GeoDataLineStringPrivate *p();
371  const GeoDataLineStringPrivate *p() const;
372 };
373 
374 }
375 
376 Q_DECLARE_METATYPE( Marble::GeoDataLineString )
377 
378 #endif
GeoDataCoordinates.h
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::NoTessellation
Definition: MarbleGlobal.h:31
QDataStream
Marble::GeoDataGeometry
A base class for all geodata features.
Definition: GeoDataGeometry.h:47
Marble::GeoDataLineString::ConstIterator
QVector< GeoDataCoordinates >::ConstIterator ConstIterator
Definition: GeoDataLineString.h:80
Marble::operator==
bool operator==(const DownloadPolicyKey &lhs, const DownloadPolicyKey &rhs)
Definition: DownloadPolicy.h:49
Marble::operator!=
bool operator!=(GeoDataLatLonBox const &lhs, GeoDataLatLonBox const &rhs)
Definition: GeoDataLatLonBox.cpp:59
MarbleGlobal.h
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
Marble::GeoDataLineStringPrivate
Definition: GeoDataLineString_p.h:21
QVector
GeoDataLatLonAltBox.h
GEODATA_EXPORT
#define GEODATA_EXPORT
Definition: geodata_export.h:22
geodata_export.h
Marble::operator<<
QTextStream & operator<<(QTextStream &stream, const RoutingInstruction &i)
Definition: RoutingInstruction.cpp:461
GeoDataGeometry.h
Marble::GeoDataLineString::Iterator
QVector< GeoDataCoordinates >::Iterator Iterator
Definition: GeoDataLineString.h:79
Marble::GeoDataLatLonAltBox
A class that defines a 3D bounding box for geographic data.
Definition: GeoDataLatLonAltBox.h:49
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal