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

marble

  • sources
  • kde-4.12
  • 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  QVector<GeoDataCoordinates>::Iterator begin();
298  QVector<GeoDataCoordinates>::ConstIterator begin() const;
299 
300 
304  QVector<GeoDataCoordinates>::Iterator end();
305  QVector<GeoDataCoordinates>::ConstIterator end() const;
306 
307 
311  QVector<GeoDataCoordinates>::ConstIterator constBegin() const;
312 
313 
317  QVector<GeoDataCoordinates>::ConstIterator constEnd() const;
318 
319 
323  void clear();
324 
325 
329  QVector<GeoDataCoordinates>::Iterator erase ( QVector<GeoDataCoordinates>::Iterator position );
330 
331 
335  QVector<GeoDataCoordinates>::Iterator erase ( QVector<GeoDataCoordinates>::Iterator begin,
336  QVector<GeoDataCoordinates>::Iterator end );
337 
338 
342  void remove ( int i );
343 
344 
345  // Serialization
350  virtual void pack( QDataStream& stream ) const;
351 
352 
357  virtual void unpack( QDataStream& stream );
358 
359 
360  protected:
361  GeoDataLineStringPrivate *p() const;
362  GeoDataLineString(GeoDataLineStringPrivate* priv);
363 };
364 
365 }
366 
367 Q_DECLARE_METATYPE( Marble::GeoDataLineString )
368 
369 #endif
GeoDataCoordinates.h
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::NoTessellation
Definition: MarbleGlobal.h:31
Marble::GeoDataGeometry
A base class for all geodata features.
Definition: GeoDataGeometry.h:47
Marble::GeoDataLineString::ConstIterator
QVector< GeoDataCoordinates >::ConstIterator ConstIterator
Definition: GeoDataLineString.h:80
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
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:455
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:50 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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