KHolidays::Holiday Class

Represents a holiday event. More...

Header: #include <KHolidays/Holiday>
CMake: find_package(KF6 REQUIRED COMPONENTS Holidays)
target_link_libraries(mytarget PRIVATE KF6::Holidays)

Public Types

enum DayType { Workday, NonWorkday }
List

Public Functions

Holiday()
Holiday(const KHolidays::Holiday &other)
(since 5.8) QStringList categoryList() const
KHolidays::Holiday::DayType dayType() const
(since 5.0) QString description() const
(since 4.6) int duration() const
(since 5.0) QString name() const
(since 4.6) QDate observedEndDate() const
(since 4.6) QDate observedStartDate() const
bool operator<(const KHolidays::Holiday &rhs) const
bool operator>(const KHolidays::Holiday &rhs) const

Detailed Description

Member Type Documentation

enum Holiday::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.

ConstantValueDescription
KHolidays::Holiday::Workday0The holiday is a workday
KHolidays::Holiday::NonWorkday1The holiday is a real holiday

Holiday::List

A list of holiday descriptions.

Member Function Documentation

Holiday::Holiday()

Creates an empty holiday.

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

Creates a holiday from an other holiday.

[since 5.8] QStringList Holiday::categoryList() const

Returns a QStringList of categories for the Holiday.

If the Holiday has no categories then an empty list is returned.

This function was introduced in 5.8.

KHolidays::Holiday::DayType Holiday::dayType() const

Returns the day type of the holiday.

[since 5.0] QString Holiday::description() const

Returns the description of the Holiday if available

This function was introduced in 5.0.

[since 4.6] int Holiday::duration() const

Returns the duration of the holiday in days.

This function was introduced in 4.6.

[since 5.0] QString Holiday::name() const

Returns the name of the Holiday.

This function was introduced in 5.0.

[since 4.6] QDate Holiday::observedEndDate() const

Returns the observed end date of the holiday.

This function was introduced in 4.6.

[since 4.6] QDate Holiday::observedStartDate() const

Returns the observed start date of the holiday.

This function was introduced in 4.6.

bool Holiday::operator<(const KHolidays::Holiday &rhs) const

bool Holiday::operator>(const KHolidays::Holiday &rhs) const