KDECore
kcalendarsystemhijri.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KCALENDARSYSTEMHIJRI_H
00022 #define KCALENDARSYSTEMHIJRI_H
00023
00024 #include <qdatetime.h>
00025 #include <qstring.h>
00026
00027 #include "kcalendarsystem.h"
00028
00029 class KCalendarSystemHijriPrivate;
00030
00043 class KDECORE_EXPORT KCalendarSystemHijri : public KCalendarSystem
00044 {
00045 public:
00047 KCalendarSystemHijri(const KLocale * locale = 0);
00048 virtual ~KCalendarSystemHijri();
00049
00050 virtual int year (const QDate & date) const;
00051 virtual int month (const QDate & date) const;
00052 virtual int day (const QDate & date) const;
00053 virtual int dayOfWeek (const QDate & date) const;
00054 virtual int dayOfYear (const QDate & date) const;
00055
00056 virtual bool setYMD(QDate & date, int y, int m, int d) const;
00057
00058 virtual QDate addYears(const QDate & date, int nyears) const;
00059 virtual QDate addMonths(const QDate & date, int nmonths) const;
00060 virtual QDate addDays(const QDate & date, int ndays) const;
00061
00062 virtual int monthsInYear (const QDate & date) const;
00063 virtual int daysInYear (const QDate & date) const;
00064 virtual int daysInMonth (const QDate & date) const;
00065 virtual int weeksInYear(int year) const;
00066 virtual int weekNumber(const QDate& date, int * yearNum = 0) const;
00067
00068 virtual QString monthName (int month, int year, bool shortName = false) const;
00069 virtual QString monthName (const QDate & date, bool shortName = false ) const;
00070 virtual QString monthNamePossessive(int month, int year, bool shortName = false) const;
00071 virtual QString monthNamePossessive(const QDate & date, bool shortName = false ) const;
00072 virtual QString weekDayName (int weekDay, bool shortName = false) const;
00073 virtual QString weekDayName (const QDate & date, bool shortName = false) const;
00074
00075 virtual int minValidYear () const;
00076 virtual int maxValidYear () const;
00077 virtual int weekDayOfPray () const;
00078
00079 virtual QString calendarName() const;
00080
00081 virtual bool isLunar() const;
00082 virtual bool isLunisolar() const;
00083 virtual bool isSolar() const;
00084
00085 private:
00093 int hndays(int month, int year) const;
00094
00095 KCalendarSystemHijriPrivate * d;
00096 };
00097
00098 #endif