Kstars

calendarwidget.h
1 /*
2  SPDX-FileCopyrightText: 2008 Jason Harris <[email protected]>
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 {
18  Q_OBJECT
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
Q_OBJECTQ_OBJECT
const T & at(int i) const const
An extension of the KPlotWidget for the SkyCalendar tool.
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 03:57:49 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.