Marble

GeoDataLatLonAltBox.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 2007 Andrew Manson <[email protected]>
9 // Copyright 2008 Torsten Rahn <[email protected]>
10 //
11 
12 
13 #ifndef MARBLE_GEODATALATLONALTBOX_H
14 #define MARBLE_GEODATALATLONALTBOX_H
15 
16 
17 #include "MarbleGlobal.h"
18 
19 #include "geodata_export.h"
20 
21 #include "GeoDataLatLonBox.h"
22 
23 #include <QHash>
24 
25 namespace Marble
26 {
27 
28 class GeoDataLatLonAltBoxPrivate;
29 
30 class GeoDataLineString;
31 
32 
47 class GEODATA_EXPORT GeoDataLatLonAltBox : public GeoDataLatLonBox
48 {
49  friend bool GEODATA_EXPORT operator==( GeoDataLatLonAltBox const& lhs, GeoDataLatLonAltBox const& rhs );
50 
51  public:
54  GeoDataLatLonAltBox( const GeoDataLatLonBox &other, qreal minAltitude, qreal maxAltitude );
62  explicit GeoDataLatLonAltBox( const GeoDataCoordinates & coordinates );
63 
64  ~GeoDataLatLonAltBox() override;
65 
66  GeoDataLatLonAltBox& operator=( const GeoDataLatLonAltBox& other );
67  GeoDataLatLonAltBox& operator=( const GeoDataCoordinates& other );
68 
70  const char* nodeType() const override;
71 
76  uint qHash(const GeoDataLatLonAltBox &);
77 
82  qreal minAltitude() const;
83  void setMinAltitude( const qreal minAltitude );
84 
89  qreal maxAltitude() const;
90  void setMaxAltitude( const qreal maxAltitude );
91 
97  AltitudeMode altitudeMode() const;
98  void setAltitudeMode( const AltitudeMode altitudeMode );
99 
100  bool contains( const GeoDataCoordinates & ) const override;
101  bool contains( const GeoDataLatLonAltBox & ) const;
102 
106  virtual bool intersects( const GeoDataLatLonAltBox & ) const;
107 
108  using GeoDataLatLonBox::intersects;
109 
114  static GeoDataLatLonAltBox fromLineString( const GeoDataLineString& lineString );
115 
120  bool isNull() const override;
121 
125  void clear() override;
126 
131  GeoDataCoordinates center() const override;
132 
134  void pack( QDataStream& stream ) const override;
136  void unpack( QDataStream& stream ) override;
137 
138  private:
139  GeoDataLatLonAltBoxPrivate * const d;
140 };
141 
142 uint GEODATA_EXPORT qHash(const GeoDataLatLonAltBox &box, uint seed = 0);
143 
144 bool GEODATA_EXPORT operator==( GeoDataLatLonAltBox const& lhs, GeoDataLatLonAltBox const& rhs );
145 
146 }
147 
148 Q_DECLARE_METATYPE( Marble::GeoDataLatLonAltBox )
149 
150 #endif
A 3d point representation.
Binds a QML item to a specific geodetic location in screen coordinates.
A LineString that allows to store a contiguous set of line segments.
KCALENDARCORE_EXPORT uint qHash(const KCalendarCore::Period &key)
A class that defines a 3D bounding box for geographic data.
A class that defines a 2D bounding box for geographic data.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Sep 24 2020 23:21:13 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.