KDECore
kcalendarsystemjalali_p.h
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2002-2003 Arash Bijanzadeh and FarsiKDE Project <www.farsikde.org> 00003 Contact: Arash Bijanzadeh <a.bijanzadeh@linuxiran.org> 00004 Copyright 2007, 2010 John Layt <john@layt.net> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef KCALENDARSYSTEMJALALI_H 00023 #define KCALENDARSYSTEMJALALI_H 00024 00025 #include "kcalendarsystem.h" 00026 00027 class KCalendarSystemJalaliPrivate; 00028 00032 class KCalendarSystemJalali : public KCalendarSystem 00033 { 00034 public: 00035 explicit KCalendarSystemJalali(const KLocale * locale = 0); 00036 explicit KCalendarSystemJalali(const KSharedConfig::Ptr config, const KLocale *locale = 0); 00037 virtual ~KCalendarSystemJalali(); 00038 00039 virtual QString calendarType() const; 00040 00041 virtual QDate epoch() const; 00042 virtual QDate earliestValidDate() const; 00043 virtual QDate latestValidDate() const; 00044 virtual bool isValid(int year, int month, int day) const; 00045 virtual bool isValid(const QDate &date) const; 00046 00047 virtual bool isLeapYear(int year) const; 00048 virtual bool isLeapYear(const QDate &date) const; 00049 00050 virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const; 00051 virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const; 00052 00053 virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const; 00054 virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const; 00055 00056 virtual int weekDayOfPray() const; 00057 00058 virtual bool isLunar() const; 00059 virtual bool isLunisolar() const; 00060 virtual bool isSolar() const; 00061 virtual bool isProleptic() const; 00062 00063 protected: 00064 virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const; 00065 virtual bool dateToJulianDay(int year, int month, int day, int &jd) const; 00066 KCalendarSystemJalali(KCalendarSystemJalaliPrivate &dd, 00067 const KSharedConfig::Ptr config = KSharedConfig::Ptr(), 00068 const KLocale *locale = 0); 00069 00070 private: 00071 Q_DECLARE_PRIVATE(KCalendarSystemJalali) 00072 }; 00073 00074 #endif // KCALENDARSYSTEMJALALI_H
KDE 4.7 API Reference