KHolidays 5.109.0
Public Types | Public Member Functions | List of all members
KHolidays::Holiday

Represents a holiday event. More...

#include <holiday.h>

Public Types

enum  DayType { Workday , NonWorkday }
 Describes the date type of the holiday. More...
 
typedef QList< HolidayList
 A list of holiday descriptions.
 

Public Member Functions

 Holiday ()
 Creates an empty holiday.
 
 Holiday (const Holiday &other)
 Creates a holiday from an other holiday.
 
 ~Holiday ()
 Destroys the holiday object.
 
QStringList categoryList () const
 
DayType dayType () const
 Returns the day type of the holiday.
 
QString description () const
 
int duration () const
 
QString name () const
 
QDate observedEndDate () const
 
QDate observedStartDate () const
 
bool operator< (const Holiday &rhs) const
 
Holidayoperator= (const Holiday &other)
 
bool operator> (const Holiday &rhs) const
 

Detailed Description

Represents a holiday event.

Member Typedef Documentation

◆ List

A list of holiday descriptions.

Member Enumeration Documentation

◆ DayType

Describes the date type of the holiday.

If any of the holidays on a date are non-workdays types, then the entire day is non-working.

Enumerator
Workday 

The holiday is a workday.

NonWorkday 

The holiday is a real holiday.

Constructor & Destructor Documentation

◆ Holiday() [1/2]

KHolidays::Holiday::Holiday ( )

Creates an empty holiday.

◆ Holiday() [2/2]

KHolidays::Holiday::Holiday ( const Holiday other)

Creates a holiday from an other holiday.

◆ ~Holiday()

KHolidays::Holiday::~Holiday ( )

Destroys the holiday object.

Member Function Documentation

◆ categoryList()

QStringList KHolidays::Holiday::categoryList ( ) const
Since
5.8

Returns a QStringList of categories for the Holiday. If the Holiday has no categories then an empty list is returned.

◆ dayType()

DayType KHolidays::Holiday::dayType ( ) const

Returns the day type of the holiday.

◆ description()

QString KHolidays::Holiday::description ( ) const
Since
5.0

Returns the description of the Holiday if available

Returns
the description of the Holiday

◆ duration()

int KHolidays::Holiday::duration ( ) const
Since
4.6

Returns the duration of the holiday in days.

◆ name()

QString KHolidays::Holiday::name ( ) const
Since
5.0

Returns the name of the Holiday.

Returns
the name of the Holiday

◆ observedEndDate()

QDate KHolidays::Holiday::observedEndDate ( ) const
Since
4.6

Returns the observed end date of the holiday.

◆ observedStartDate()

QDate KHolidays::Holiday::observedStartDate ( ) const
Since
4.6

Returns the observed start date of the holiday.