Kstars

moonphasetool.cpp
1 /*
2  SPDX-FileCopyrightText: 2010 Akarsh Simha <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "moonphasetool.h"
8 
9 #include "ksnumbers.h"
10 #include "skyobjects/ksmoon.h"
11 #include "skyobjects/kssun.h"
12 
13 #include <QCalendarWidget>
14 
15 MoonPhaseTool::MoonPhaseTool(QWidget *parent) : QDialog(parent, Qt::Dialog)
16 {
17 #ifdef Q_OS_OSX
18  setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint);
19 #endif
20 
21  //KStarsDateTime dtStart ( KStarsDateTime::currentDateTime() );
22  m_Moon.reset(new KSMoon);
23  m_Sun.reset(new KSSun);
24  mpc.reset(new MoonPhaseCalendar(*m_Moon, *m_Sun));
25  //gcw = new GenericCalendarWidget( *mpc, this );
26 
27  gcw = new QCalendarWidget(this);
28  //FIXME Need porting to KF5, can we use QCalendarWidget instead of GenericCalendarWidget?
29  //setButtons( 0 );
30  setFixedSize(gcw->size());
31  setWindowTitle(xi18n("Moon Phase Calendar"));
32 }
QString xi18n(const char *text, const TYPE &arg...)
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
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 03:57:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.