KHolidays 5.109.0
zodiac.h
1/*
2 This file is part of the kholidays library.
3
4 SPDX-FileCopyrightText: 2005-2007 Allen Winter <winter@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef KHOLIDAYS_ZODIAC_H
10#define KHOLIDAYS_ZODIAC_H
11
12#include "kholidays_export.h"
13
14#include <QSharedDataPointer>
15
16class QDate;
17class QString;
18
19namespace KHolidays
20{
21class ZodiacPrivate;
22
51class KHOLIDAYS_EXPORT Zodiac
52{
53public:
54 enum ZodiacType {
55 Tropical,
56 Sidereal,
57 };
58
59 enum ZodiacSigns {
60 Aries,
61 Taurus,
62 Gemini,
63 Cancer,
64 Leo,
65 Virgo,
66 Libra,
67 Scorpio,
68 Sagittarius,
69 Capricorn,
70 Aquarius,
71 Pisces,
72 None,
73 };
74
75 explicit Zodiac(ZodiacType type);
76 Zodiac(const Zodiac &other);
77 ~Zodiac();
78
79 Zodiac &operator=(const Zodiac &other);
80
88 ZodiacSigns signAtDate(const QDate &date) const;
89
97 QString signNameAtDate(const QDate &date) const;
98
104 static QString signName(ZodiacSigns sign);
105
109 static QString signSymbol(ZodiacSigns sign);
110
111private:
112 QSharedDataPointer<ZodiacPrivate> d;
113};
114
115}
116
117#endif
Represents and manages the Zodiac calendar.
Definition zodiac.h:52
static QString signName(ZodiacSigns sign)
Return the string representation of Zodiac sign.
QString signNameAtDate(const QDate &date) const
Return the Zodiac sign as a text string for the specified date.
ZodiacSigns signAtDate(const QDate &date) const
Return the Zodiac sign for the specified Gregorian date.
static QString signSymbol(ZodiacSigns sign)
Convert the Zodiac sign to a Zodiac symbol.