KHolidays::Zodiac

Search for usage in LXR

#include <zodiac.h>

Public Types

enum  ZodiacSigns {
  Aries , Taurus , Gemini , Cancer ,
  Leo , Virgo , Libra , Scorpio ,
  Sagittarius , Capricorn , Aquarius , Pisces ,
  None
}
 
enum  ZodiacType { Tropical , Sidereal }
 

Public Member Functions

 Zodiac (const Zodiac &other)
 
 Zodiac (ZodiacType type)
 
Zodiacoperator= (const Zodiac &other)
 
ZodiacSigns signAtDate (const QDate &date) const
 
QString signNameAtDate (const QDate &date) const
 

Static Public Member Functions

static QString signName (ZodiacSigns sign)
 
static QString signSymbol (ZodiacSigns sign)
 

Detailed Description

Represents and manages the Zodiac calendar.

The Tropical and Sidereal Zodiacs are supported.

A very good description of the Zodiac calendars can be read at the Wikipedia, https://en.wikipedia.org/wiki/Zodiac

Disclaimer: I am by no means a Zodiac expert. I put together this software based on some quick scanning of documents I found on the WWW. Feel free to contact me about this code if you have improvements.

Sign Symbol Birthdates Tropical Sidereal Aries ram Mar 21 - Apr 19 Apr 14 - May 14 Taurus bull Apr 20 - May 20 May 15 - Jun 14 Gemini twins May 21 - Jun 20 Jun 15 - Jul 16 Cancer crab Jun 21 - Jul 22 Jul 17 - Aug 16 Leo lion Jul 23 - Aug 22 Aug 17 - Sep 16 Virgo virgin Aug 23 - Sep 22 Sep 17 - Oct 17 Libra scale Sep 23 - Oct 22 Oct 18 - Nov 16 Scorpio scorpion Oct 23 - Nov 21 Nov 17 - Dec 15 Sagittarius archer Nov 22 - Dec 21 Dec 16 - Jan 14 Capricorn goat Dec 22 - Jan 19 Jan 15 - Feb 12 Aquarius water Jan 20 - Feb 18 Feb 13 - Mar 14 Pisces fish Feb 19 - Mar 20 Mar 15 - Apr 13

Definition at line 51 of file zodiac.h.

Member Enumeration Documentation

◆ ZodiacSigns

enum KHolidays::Zodiac::ZodiacSigns

Definition at line 59 of file zodiac.h.

◆ ZodiacType

enum KHolidays::Zodiac::ZodiacType

Definition at line 54 of file zodiac.h.

Constructor & Destructor Documentation

◆ Zodiac() [1/2]

Zodiac::Zodiac ( ZodiacType type)
explicit

Definition at line 34 of file zodiac.cpp.

◆ Zodiac() [2/2]

Zodiac::Zodiac ( const Zodiac & other)

Definition at line 39 of file zodiac.cpp.

◆ ~Zodiac()

Zodiac::~Zodiac ( )

Definition at line 44 of file zodiac.cpp.

Member Function Documentation

◆ operator=()

Zodiac & Zodiac::operator= ( const Zodiac & other)

Definition at line 48 of file zodiac.cpp.

◆ signAtDate()

Zodiac::ZodiacSigns Zodiac::signAtDate ( const QDate & date) const

Return the Zodiac sign for the specified Gregorian date.

The enum 'None' is returned if one of the supported signs does not occur on the date.

Parameters
datecompute the Zodiac sign for the specified Gregorian date.

Definition at line 95 of file zodiac.cpp.

◆ signName()

QString Zodiac::signName ( Zodiac::ZodiacSigns sign)
static

Return the string representation of Zodiac sign.

Parameters
signZodiac sign.

Definition at line 62 of file zodiac.cpp.

◆ signNameAtDate()

QString Zodiac::signNameAtDate ( const QDate & date) const

Return the Zodiac sign as a text string for the specified date.

A null string is returned if one of the supported Zodiac signs does not occur on the date.

Parameters
datecompute the Zodiac sign for the specified Gregorian date.

Definition at line 57 of file zodiac.cpp.

◆ signSymbol()

QString Zodiac::signSymbol ( Zodiac::ZodiacSigns sign)
static

Convert the Zodiac sign to a Zodiac symbol.

Definition at line 254 of file zodiac.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:59:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.