• 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
  • plugins
  • render
  • eclipses
EclipsesItem.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 2012 Rene Kuettner <rene@bitkanal.net>
9 //
10 
11 #ifndef MARBLE_ECLIPSESITEM_H
12 #define MARBLE_ECLIPSESITEM_H
13 
14 #include <QObject>
15 #include <QDateTime>
16 
17 #include "GeoDataLineString.h"
18 #include "GeoDataCoordinates.h"
19 #include "GeoDataLinearRing.h"
20 
21 #include <eclsolar.h>
22 
23 namespace Marble
24 {
25 
37 class EclipsesItem : public QObject
38 {
39  Q_OBJECT
40 
41 public:
42 
46  enum EclipsePhase {
47  TotalMoon = -4,
48  PartialMoon = -3,
49  PenumbralMoon = -1,
50  PartialSun = 1,
51  NonCentralAnnularSun = 2,
52  NonCentralTotalSun = 3,
53  AnnularSun = 4,
54  TotalSun = 5,
55  AnnularTotalSun = 6
56  };
57 
63  explicit EclipsesItem( EclSolar *ecl, int index, QObject *parent = 0 );
64 
65  ~EclipsesItem();
66 
74  int index() const;
75 
86  bool takesPlaceAt( const QDateTime &dateTime ) const;
87 
93  EclipsesItem::EclipsePhase phase() const;
94 
95 
100  QIcon icon() const;
101 
107  QString phaseText() const;
108 
114  const QDateTime& dateMaximum() const;
115 
121  const QDateTime& startDatePartial() const;
122 
128  const QDateTime& endDatePartial() const;
129 
135  int partialDurationHours() const;
136 
147  const QDateTime& startDateTotal() const;
148 
159  const QDateTime& endDateTotal() const;
160 
165  double magnitude() const;
166 
172  const GeoDataCoordinates& maxLocation();
173 
178  const GeoDataLineString& centralLine();
179 
184  const GeoDataLinearRing& umbra();
185 
190  const GeoDataLineString& southernPenumbra();
191 
196  const GeoDataLineString& northernPenumbra();
197 
202  const QList<GeoDataLinearRing>& sunBoundaries();
203 
208  GeoDataLinearRing shadowConeUmbra();
209 
214  GeoDataLinearRing shadowConePenumbra();
215 
220  GeoDataLinearRing shadowCone60MagPenumbra();
221 
222 private:
231  void initialize();
232 
239  void calculate();
240 
241  EclSolar *m_ecl;
242  int m_index;
243  bool m_calculationsNeedUpdate;
244  bool m_isTotal;
245  QDateTime m_dateMaximum;
246  QDateTime m_startDatePartial;
247  QDateTime m_endDatePartial;
248  QDateTime m_startDateTotal;
249  QDateTime m_endDateTotal;
250  EclipsesItem::EclipsePhase m_phase;
251  double m_magnitude;
252 
253  GeoDataCoordinates m_maxLocation;
254  GeoDataLineString m_centralLine;
255  GeoDataLinearRing m_umbra;
256  GeoDataLineString m_southernPenumbra;
257  GeoDataLineString m_northernPenumbra;
258  GeoDataLinearRing m_shadowConeUmbra;
259  GeoDataLinearRing m_shadowConePenumbra;
260  GeoDataLinearRing m_shadowCone60MagPenumbra;
261  QList<GeoDataLinearRing> m_sunBoundaries;
262 };
263 
264 }
265 
266 #endif // MARBLE_ECLIPSESITEM_H
267 
Marble::EclipsesItem::icon
QIcon icon() const
Returns an icon of the eclipse type.
Definition: EclipsesItem.cpp:59
Marble::EclipsesItem::northernPenumbra
const GeoDataLineString & northernPenumbra()
Return the eclipse's northern penumbra.
Definition: EclipsesItem.cpp:171
GeoDataCoordinates.h
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::EclipsesItem::TotalSun
Definition: EclipsesItem.h:54
Marble::EclipsesItem::AnnularTotalSun
Definition: EclipsesItem.h:55
Marble::GeoDataLinearRing
A LinearRing that allows to store a closed, contiguous set of line segments.
Definition: GeoDataLinearRing.h:68
Marble::EclipsesItem::shadowConePenumbra
GeoDataLinearRing shadowConePenumbra()
Return the shadow cone of the penumbra.
Definition: EclipsesItem.cpp:189
Marble::EclipsesItem::shadowCone60MagPenumbra
GeoDataLinearRing shadowCone60MagPenumbra()
Return the shadow cone of the penumbra at 60 percent magnitude.
Definition: EclipsesItem.cpp:198
Marble::EclipsesItem::maxLocation
const GeoDataCoordinates & maxLocation()
Return the coordinates of the eclipse's maximum.
Definition: EclipsesItem.cpp:135
Marble::EclipsesItem::phase
EclipsesItem::EclipsePhase phase() const
Returns the phase of this eclipse event.
Definition: EclipsesItem.cpp:54
Marble::EclipsesItem::TotalMoon
Definition: EclipsesItem.h:47
Marble::EclipsesItem::sunBoundaries
const QList< GeoDataLinearRing > & sunBoundaries()
Return the eclipse's sun boundaries.
Definition: EclipsesItem.cpp:207
Marble::EclipsesItem::~EclipsesItem
~EclipsesItem()
Definition: EclipsesItem.cpp:39
eclsolar.h
Marble::EclipsesItem::partialDurationHours
int partialDurationHours() const
Returns the number of hours the partial phase takes place.
Definition: EclipsesItem.cpp:119
Marble::EclipsesItem::AnnularSun
Definition: EclipsesItem.h:53
EclSolar
Definition: eclsolar.h:22
Marble::EclipsesItem::centralLine
const GeoDataLineString & centralLine()
The eclipse's central line.
Definition: EclipsesItem.cpp:144
Marble::EclipsesItem::PenumbralMoon
Definition: EclipsesItem.h:49
Marble::EclipsesItem::index
int index() const
The index of the eclipse event.
Definition: EclipsesItem.cpp:43
Marble::EclipsesItem::dateMaximum
const QDateTime & dateMaximum() const
Returns the date of the eclipse event's maximum.
Definition: EclipsesItem.cpp:104
QObject
Marble::EclipsesItem::NonCentralAnnularSun
Definition: EclipsesItem.h:51
GeoDataLineString.h
QString
QList
Marble::EclipsesItem::PartialMoon
Definition: EclipsesItem.h:48
Marble::EclipsesItem::EclipsesItem
EclipsesItem(EclSolar *ecl, int index, QObject *parent=0)
Construct the EclipseItem object and trigger basic calculations.
Definition: EclipsesItem.cpp:20
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
Marble::EclipsesItem::endDatePartial
const QDateTime & endDatePartial() const
Returns the end date of the eclipse's partial phase.
Definition: EclipsesItem.cpp:114
Marble::EclipsesItem::magnitude
double magnitude() const
Return the eclipse's magnitude.
Definition: EclipsesItem.cpp:99
GeoDataLinearRing.h
Marble::EclipsesItem::takesPlaceAt
bool takesPlaceAt(const QDateTime &dateTime) const
Check if the event takes place at a given datetime.
Definition: EclipsesItem.cpp:48
Marble::EclipsesItem::shadowConeUmbra
GeoDataLinearRing shadowConeUmbra()
Return the shadow cone of the umbra.
Definition: EclipsesItem.cpp:180
Marble::EclipsesItem::NonCentralTotalSun
Definition: EclipsesItem.h:52
Marble::EclipsesItem::umbra
const GeoDataLinearRing & umbra()
Return the eclipse's umbra.
Definition: EclipsesItem.cpp:153
Marble::EclipsesItem::EclipsePhase
EclipsePhase
A type of an eclipse event.
Definition: EclipsesItem.h:46
Marble::EclipsesItem::phaseText
QString phaseText() const
Returns a human readable representation of the eclipse type.
Definition: EclipsesItem.cpp:82
Marble::EclipsesItem::PartialSun
Definition: EclipsesItem.h:50
Marble::EclipsesItem::startDateTotal
const QDateTime & startDateTotal() const
Returns the start date of the eclipse's total phase.
Definition: EclipsesItem.cpp:125
QObject::parent
QObject * parent() const
Marble::EclipsesItem::southernPenumbra
const GeoDataLineString & southernPenumbra()
Return the eclipse's southern penumbra.
Definition: EclipsesItem.cpp:162
Marble::EclipsesItem::endDateTotal
const QDateTime & endDateTotal() const
Returns the end date of the eclipse's total phase.
Definition: EclipsesItem.cpp:130
Marble::EclipsesItem
The representation of an eclipse event.
Definition: EclipsesItem.h:37
QIcon
QDateTime
Marble::EclipsesItem::startDatePartial
const QDateTime & startDatePartial() const
Returns the start date of the eclipse's partial phase.
Definition: EclipsesItem.cpp:109
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