• 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
GeoDataLatLonBox.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 2007 Andrew Manson <g.real.ate@gmail.com>
9 // Copyright 2008-2009 Torsten Rahn <rahn@kde.org>
10 //
11 
12 
13 #ifndef MARBLE_GEODATALATLONBOX_H
14 #define MARBLE_GEODATALATLONBOX_H
15 
16 
17 #include "MarbleGlobal.h"
18 
19 #include "GeoDataObject.h"
20 #include "GeoDataCoordinates.h"
21 
22 #include "geodata_export.h"
23 
24 namespace Marble
25 {
26 
27 class GeoDataLatLonBoxPrivate;
28 
29 class GeoDataLineString;
30 
51 class GEODATA_EXPORT GeoDataLatLonBox : public GeoDataObject
52 {
53  friend bool GEODATA_EXPORT operator==( GeoDataLatLonBox const& lhs, GeoDataLatLonBox const& rhs );
54  friend bool GEODATA_EXPORT operator!=( GeoDataLatLonBox const& lhs, GeoDataLatLonBox const& rhs );
55 
56  public:
57  GeoDataLatLonBox();
58  GeoDataLatLonBox( qreal north, qreal south, qreal east, qreal west, GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian );
59  GeoDataLatLonBox( const GeoDataLatLonBox & );
60  virtual ~GeoDataLatLonBox();
61 
62  GeoDataLatLonBox& operator=( const GeoDataLatLonBox& other );
63 
65  virtual const char* nodeType() const;
66 
71  qreal north( GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ) const;
72  void setNorth( const qreal north, GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian );
73 
78  qreal south( GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ) const;
79  void setSouth( const qreal south, GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian );
80 
85  qreal east( GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ) const;
86  void setEast( const qreal east, GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian );
87 
92  qreal west( GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ) const;
93  void setWest( const qreal west, GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian );
94 
99  qreal rotation( GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ) const;
100  void setRotation( const qreal rotation, GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian );
101 
102  void boundaries( qreal &north, qreal &south, qreal &east, qreal &west, GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ) const;
103  void setBoundaries( qreal north, qreal south, qreal east, qreal west, GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian );
104 
109  qreal width( GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ) const;
110 
115  qreal height( GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ) const;
116 
122  bool crossesDateLine() const;
123 
128  virtual GeoDataCoordinates center() const;
129 
135  bool containsPole( Pole pole = AnyPole ) const;
136 
137  virtual bool contains( const GeoDataCoordinates & ) const;
138  bool contains( const GeoDataLatLonBox & ) const;
139 
140  virtual bool intersects( const GeoDataLatLonBox & ) const;
141 
145  GeoDataLatLonBox united( const GeoDataLatLonBox& other) const;
146 
150  GeoDataLatLonBox toCircumscribedRectangle() const;
151 
156  static GeoDataLatLonBox fromLineString( const GeoDataLineString& lineString );
157 
161  virtual QString toString( GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ) const;
162 
167  virtual bool isNull() const;
168 
173  virtual bool isEmpty() const;
174 
178  virtual void clear();
179 
180  GeoDataLatLonBox operator|( const GeoDataLatLonBox& other ) const;
181 
186  GeoDataLatLonBox& operator |=( const GeoDataLatLonBox& other) ;
187 
189  virtual void pack( QDataStream& stream ) const;
191  virtual void unpack( QDataStream& stream );
192 
193  private:
194  GeoDataLatLonBoxPrivate * const d;
195  static const GeoDataLatLonBox empty;
196 };
197 
198 }
199 
200 Q_DECLARE_METATYPE( Marble::GeoDataLatLonBox )
201 
202 #endif
Marble::GeoDataCoordinates::Unit
Unit
enum used constructor to specify the units used
Definition: GeoDataCoordinates.h:64
GeoDataCoordinates.h
Marble::AnyPole
Any pole.
Definition: MarbleGlobal.h:156
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::GeoDataCoordinates::Radian
Definition: GeoDataCoordinates.h:65
QDataStream
Marble::GeoDataObject
A base class for all geodata objects.
Definition: GeoDataObject.h:48
Marble::operator==
bool operator==(const DownloadPolicyKey &lhs, const DownloadPolicyKey &rhs)
Definition: DownloadPolicy.h:49
GeoDataObject.h
Marble::operator!=
bool operator!=(GeoDataLatLonBox const &lhs, GeoDataLatLonBox const &rhs)
Definition: GeoDataLatLonBox.cpp:59
QString
MarbleGlobal.h
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
GEODATA_EXPORT
#define GEODATA_EXPORT
Definition: geodata_export.h:22
geodata_export.h
Marble::Pole
Pole
Definition: MarbleGlobal.h:155
Marble::GeoDataLatLonBox
A class that defines a 2D bounding box for geographic data.
Definition: GeoDataLatLonBox.h:51
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