00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef KHOLIDAYS_HOLIDAY_H
00026 #define KHOLIDAYS_HOLIDAY_H
00027
00028 #include "kholidays_export.h"
00029
00030 #include <QtCore/QList>
00031 #include <QtCore/QSharedDataPointer>
00032
00033 class QDate;
00034 class QString;
00035
00036 namespace KHolidays {
00037
00038 class HolidayPrivate;
00039 class HolidayRegion;
00040
00041 class KHOLIDAYS_EXPORT Holiday
00042 {
00043 friend class HolidayRegion;
00044 friend class HolidayParserDriverPlan;
00045 friend class HolidayParserDriverPlanOld;
00046
00047 public:
00051 typedef QList<Holiday> List;
00052
00056 enum DayType {
00057 Workday,
00058 NonWorkday
00059 };
00060
00064 enum MultidayMode {
00065 MultidayHolidaysAsMultipleEvents,
00066 MultidayHolidaysAsSingleEvents
00067 };
00068
00072 Holiday();
00073
00077 Holiday( const Holiday &other );
00078
00082 ~Holiday();
00083
00087 Holiday &operator=( const Holiday &other );
00088
00092 bool operator<( const Holiday &rhs ) const;
00093
00097 bool operator>( const Holiday &rhs ) const;
00098
00102 QDate date() const;
00103
00109 QDate observedStartDate() const;
00110
00116 QDate observedEndDate() const;
00117
00123 int duration() const;
00124
00128 QString text() const;
00129
00133 QString shortText() const;
00134
00138 DayType dayType() const;
00139
00140 private:
00141 QSharedDataPointer<HolidayPrivate> d;
00142 };
00143
00144 }
00145
00146 #endif // KHOLIDAYS_HOLIDAY_H