Kstars

moonphasetool.h
1 /*
2  SPDX-FileCopyrightText: 2010 Akarsh Simha <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 //#include "widgets/genericcalendarwidget.h"
10 #include "widgets/moonphasecalendarwidget.h"
11 
12 #include <QDialog>
13 
14 #include <memory>
15 
16 class QCalendarWidget;
17 
18 class KSMoon;
19 class KSNumbers;
20 class KSSun;
21 
22 /**
23  * @class MoonPhaseTool
24  * @short Shows a moon phase calendar for an entire month
25  *
26  * This tool shows a moon phase calendar for an entire month in the
27  * same spirit as this website:
28  * https://stardate.org/nightsky/moon
29  *
30  * It uses a clone of KSMoon in the backend to perform the phase
31  * computation and uses the moon images for the various phases to
32  * display a nice table
33  *
34  * @author Akarsh Simha
35  * @version 1.0
36  */
37 class MoonPhaseTool : public QDialog
38 {
39  Q_OBJECT
40 
41  public:
42  explicit MoonPhaseTool(QWidget *p);
43 
44  /*
45  public slots:
46 
47  void slotUpdate();
48  void slotSetMonth();
49  */
50 
51  private:
52  std::unique_ptr<KSMoon> m_Moon;
53  std::unique_ptr<KSSun> m_Sun;
54  KSNumbers *m_Num { nullptr };
55  unsigned short month { 0 };
56  unsigned int year { 0 };
57  //GenericCalendarWidget *gcw { nullptr };
58  QCalendarWidget *gcw { nullptr };
59  std::unique_ptr<MoonPhaseCalendar> mpc;
60 };
Q_OBJECTQ_OBJECT
Shows a moon phase calendar for an entire month.
Definition: moonphasetool.h:37
Provides necessary information about the Moon. A subclass of SkyObject that provides information need...
Definition: ksmoon.h:25
Provides necessary information about the Sun.
Definition: kssun.h:23
Store several time-dependent astronomical quantities.
Definition: ksnumbers.h:42
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Oct 1 2023 04:02:41 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.