Kstars

moonphasetool.cpp
1/*
2 SPDX-FileCopyrightText: 2010 Akarsh Simha <akarshsimha@gmail.com>
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
15MoonPhaseTool::MoonPhaseTool(QWidget *parent) : QDialog(parent, Qt::Dialog)
16{
17#ifdef Q_OS_MACOS
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}
Provides necessary information about the Moon.
Definition ksmoon.h:26
Child class of KSPlanetBase; encapsulates information about the Sun.
Definition kssun.h:24
QString xi18n(const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.