00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KHOLIDAYS_HOLIDAYS_H
00021 #define KHOLIDAYS_HOLIDAYS_H
00022
00023 #include <tqstring.h>
00024 #include <tqstringlist.h>
00025 #include <tqdatetime.h>
00026 #include <tqvaluelist.h>
00027
00028 #include <kdepimmacros.h>
00029
00030 struct KHoliday {
00031 TQString text;
00032 TQString shortText;
00033 int Category;
00034 };
00035
00036 class KDE_EXPORT KHolidays {
00037 public:
00043 static TQStringList locations();
00047 static TQString fileForLocation( const TQString &location );
00052 static TQString userPath( bool create = false );
00056 static TQString generateFileName( const TQString &location );
00057
00058 KHolidays( const TQString& location );
00059 ~KHolidays();
00060
00062 TQString location() const;
00063
00064 TQValueList<KHoliday> getHolidays( const TQDate& );
00065
00066 KDE_DEPRECATED TQString shortText( const TQDate& );
00067 KDE_DEPRECATED TQString getHoliday( const TQDate& );
00068
00069 enum { WORKDAY, HOLIDAY };
00070 KDE_DEPRECATED int category( const TQDate& );
00071
00072 private:
00073 bool parseFile( const TQDate& );
00074
00075 TQString mLocation;
00076 TQString mHolidayFile;
00077 int mYearLast;
00078 };
00079
00080 #endif