KHolidays::Holiday Class
class KHolidays::HolidayRepresents a holiday event. More...
| Header: | #include <KHolidays/Holiday> |
| CMake: | find_package(KF6 REQUIRED COMPONENTS Holidays)target_link_libraries(mytarget PRIVATE KF6::Holidays) |
Public Types
Public Functions
| Holiday() | |
| Holiday(const KHolidays::Holiday &other) | |
| QStringList | categoryList() const |
| KHolidays::Holiday::DayType | dayType() const |
| QString | description() const |
| int | duration() const |
| QString | name() const |
| QDate | observedEndDate() const |
| 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.
| Constant | Value | Description |
|---|---|---|
KHolidays::Holiday::Workday | 0 | The holiday is a workday |
KHolidays::Holiday::NonWorkday | 1 | The 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.
QStringList Holiday::categoryList() const
Returns a QStringList of categories for the Holiday.
If the Holiday has no categories then an empty list is returned.
KHolidays::Holiday::DayType Holiday::dayType() const
Returns the day type of the holiday.
QString Holiday::description() const
Returns the description of the Holiday if available
int Holiday::duration() const
Returns the duration of the holiday in days.
QString Holiday::name() const
Returns the name of the Holiday.
QDate Holiday::observedEndDate() const
Returns the observed end date of the holiday.
QDate Holiday::observedStartDate() const
Returns the observed start date of the holiday.