KDECore
kcalendarsystemthai_p.h
Go to the documentation of this file.
00001 /* 00002 Copyright 2010 John Layt <john@layt.net> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef KCALENDARSYSTEMTHAI_H 00021 #define KCALENDARSYSTEMTHAI_H 00022 00023 #include "kcalendarsystemgregorian_p.h" 00024 00025 class KCalendarSystemThaiPrivate; 00026 00038 class KCalendarSystemThai: public KCalendarSystemGregorian 00039 { 00040 public: 00041 explicit KCalendarSystemThai(const KLocale *locale = 0); 00042 explicit KCalendarSystemThai(const KSharedConfig::Ptr config, const KLocale *locale = 0); 00043 virtual ~KCalendarSystemThai(); 00044 00045 virtual QString calendarType() const; 00046 00047 virtual QDate epoch() const; 00048 virtual QDate earliestValidDate() const; 00049 virtual QDate latestValidDate() const; 00050 virtual bool isValid(int year, int month, int day) const; 00051 virtual bool isValid(const QDate &date) const; 00052 00053 virtual bool isLeapYear(int year) const; 00054 virtual bool isLeapYear(const QDate &date) 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 KCalendarSystemThai(KCalendarSystemThaiPrivate &dd, 00067 const KSharedConfig::Ptr config = KSharedConfig::Ptr(), 00068 const KLocale *locale = 0); 00069 00070 private: 00071 Q_DECLARE_PRIVATE(KCalendarSystemThai) 00072 }; 00073 00074 #endif // KCALENDARSYSTEMTHAI_H
KDE 4.7 API Reference