Marble

GeoDataGeometry.h
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 Torsten Rahn <[email protected]>
9 // Copyright 2008-2009 Patrick Spendrin <[email protected]>
10 // Copyright 2008 Inge Wallin <[email protected]>
11 //
12 
13 
14 #ifndef MARBLE_GEODATAGEOMETRY_H
15 #define MARBLE_GEODATAGEOMETRY_H
16 
17 
18 #include "GeoDataObject.h"
19 #include "MarbleGlobal.h"
20 
21 #include "geodata_export.h"
22 
23 namespace Marble
24 {
25 
26 class GeoDataGeometryPrivate;
27 
28 class GeoDataLatLonAltBox;
29 class GeoDataLineString; // LinearRing is the same!
30 class GeoDataMultiGeometry;
31 
43 class GEODATA_EXPORT GeoDataGeometry : public GeoDataObject
44 {
45  public:
46  ~GeoDataGeometry() override;
47 
48  virtual EnumGeometryId geometryId() const = 0;
49 
50  virtual GeoDataGeometry *copy() const = 0;
51 
52  bool operator==(const GeoDataGeometry &other) const;
53  inline bool operator!=(const GeoDataGeometry &other) const { return !(*this == other); }
54 
55  bool extrude() const;
56  void setExtrude( bool extrude );
57 
58  AltitudeMode altitudeMode() const;
59  void setAltitudeMode( const AltitudeMode altitudeMode );
60 
61  virtual const GeoDataLatLonAltBox& latLonAltBox() const;
62 
64  void pack( QDataStream& stream ) const override;
66  void unpack( QDataStream& stream ) override;
67 
68  void detach();
69 
70  protected:
71  explicit GeoDataGeometry( GeoDataGeometryPrivate* priv );
72  explicit GeoDataGeometry(const GeoDataGeometry &other);
73  GeoDataGeometry& operator=(const GeoDataGeometry &other);
74 
75  bool equals(const GeoDataGeometry &other) const;
76 
78 
79  protected:
80  GeoDataGeometryPrivate *d_ptr;
81 };
82 
83 }
84 
85 Q_DECLARE_METATYPE( Marble::GeoDataGeometry* )
86 
87 #endif
Binds a QML item to a specific geodetic location in screen coordinates.
A base class for all geodata objects.
Definition: GeoDataObject.h:48
A base class for all geodata features.
virtual bool equals(const GeoDataObject &other) const
Compares the value of id and targetId of the two objects.
A class that defines a 3D bounding box for geographic data.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 23:21:13 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.