forked from psemiletov/tea-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
calendar.h
52 lines (36 loc) · 1 KB
/
calendar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef CALENDAR_H
#define CALENDAR_H
#include <QCalendarWidget>
class CCalendarWidget: public QCalendarWidget
{
Q_OBJECT
protected:
#if QT_VERSION < 0x060000
void paintCell (QPainter *painter, const QRect &rect, const QDate &date) const;
#else
void paintCell (QPainter *painter, const QRect &rect, QDate date) const;
#endif
public:
QImage moon_tiles;
QString dir_days;
bool moon_mode;
bool northern_hemisphere;
int moon_phase_algo;
CCalendarWidget (QWidget *parent, const QString &a_dir_days);
void do_update();
};
enum
{
MOON_PHASE_TRIG2 = 0,
MOON_PHASE_TRIG1,
MOON_PHASE_CONWAY,
MOON_PHASE_LEUESHKANOV,
MOON_PHASE_SIMPLE
};
int moon_phase_by_algo (int v, int year, int month, int day);
int moon_phase_trig2 (int year, int month, int day);
int moon_phase_simple (int year, int month, int day);
int moon_phase_conway (int year, int month, int day);
int moon_phase_trig1 (int year, int month, int day);
int moon_phase_leueshkanov (int year, int month, int day);
#endif // CALENDAR_H