Kstars

calendarwidget.h
1/*
2 SPDX-FileCopyrightText: 2008 Jason Harris <kstars@30doradus.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#ifndef CALENDARWIDGET_H_
8#define CALENDARWIDGET_H_
9
10#include <QDate>
11#include <kplotwidget.h>
12
13/** @class CalendarWidget
14 *@short An extension of the KPlotWidget for the SkyCalendar tool.
15 */
17{
19 public:
20 explicit CalendarWidget(QWidget *parent = nullptr);
21 void setHorizon();
22 inline float getRiseTime(int i) { return riseTimeList.at(i); }
23 inline float getSetTime(int i) { return setTimeList.at(i); }
24
25 protected:
26 void paintEvent(QPaintEvent *e) override;
27
28 private:
29 void drawHorizon(QPainter *p);
30 void drawAxes(QPainter *p) override;
31
32 QList<QDate> dateList;
33 QList<float> riseTimeList;
34 QList<float> setTimeList;
35
36 float minSTime;
37 float maxRTime;
38
39 QPolygonF polySunRise;
40 QPolygonF polySunSet;
41};
42
43#endif
An extension of the KPlotWidget for the SkyCalendar tool.
const_reference at(qsizetype i) const const
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:59:53 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.