File indexing completed on 2024-04-28 11:25:33
0001 /* 0002 SPDX-FileCopyrightText: 2010 Akarsh Simha <akarshsimha@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 //#include "widgets/genericcalendarwidget.h" 0010 #include "widgets/moonphasecalendarwidget.h" 0011 0012 #include <QDialog> 0013 0014 #include <memory> 0015 0016 class QCalendarWidget; 0017 0018 class KSMoon; 0019 class KSNumbers; 0020 class KSSun; 0021 0022 /** 0023 * @class MoonPhaseTool 0024 * @short Shows a moon phase calendar for an entire month 0025 * 0026 * This tool shows a moon phase calendar for an entire month in the 0027 * same spirit as this website: 0028 * https://stardate.org/nightsky/moon 0029 * 0030 * It uses a clone of KSMoon in the backend to perform the phase 0031 * computation and uses the moon images for the various phases to 0032 * display a nice table 0033 * 0034 * @author Akarsh Simha 0035 * @version 1.0 0036 */ 0037 class MoonPhaseTool : public QDialog 0038 { 0039 Q_OBJECT 0040 0041 public: 0042 explicit MoonPhaseTool(QWidget *p); 0043 0044 /* 0045 public slots: 0046 0047 void slotUpdate(); 0048 void slotSetMonth(); 0049 */ 0050 0051 private: 0052 std::unique_ptr<KSMoon> m_Moon; 0053 std::unique_ptr<KSSun> m_Sun; 0054 KSNumbers *m_Num { nullptr }; 0055 unsigned short month { 0 }; 0056 unsigned int year { 0 }; 0057 //GenericCalendarWidget *gcw { nullptr }; 0058 QCalendarWidget *gcw { nullptr }; 0059 std::unique_ptr<MoonPhaseCalendar> mpc; 0060 };