• Skip to content
  • Skip to link menu
KDE 4.7 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KDECore

kcalendarsystemjulian_p.h
Go to the documentation of this file.
00001 /*
00002     Copyright 2009, 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 KCALENDARSYSTEMJULIAN_H
00021 #define KCALENDARSYSTEMJULIAN_H
00022 
00023 #include "kcalendarsystem.h"
00024 
00025 class KCalendarSystemJulianPrivate;
00026 
00041 class KCalendarSystemJulian: public KCalendarSystem
00042 {
00043 public:
00044     explicit KCalendarSystemJulian(const KLocale *locale = 0);
00045     explicit KCalendarSystemJulian(const KSharedConfig::Ptr config, const KLocale *locale = 0);
00046     virtual ~KCalendarSystemJulian();
00047 
00048     virtual QString calendarType() const;
00049 
00050     virtual QDate epoch() const;
00051     virtual QDate earliestValidDate() const;
00052     virtual QDate latestValidDate() const;
00053     virtual bool isValid(int year, int month, int day) const;
00054     virtual bool isValid(const QDate &date) const;
00055 
00056     virtual bool isLeapYear(int year) const;
00057     virtual bool isLeapYear(const QDate &date) const;
00058 
00059     virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
00060     virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
00061 
00062     virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
00063     virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
00064 
00065     virtual int weekDayOfPray() const;
00066 
00067     virtual bool isLunar() const;
00068     virtual bool isLunisolar() const;
00069     virtual bool isSolar() const;
00070     virtual bool isProleptic() const;
00071 
00072 protected:
00073     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
00074     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
00075     KCalendarSystemJulian(KCalendarSystemJulianPrivate &dd,
00076                           const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
00077                           const KLocale *locale = 0);
00078 
00079 private:
00080     Q_DECLARE_PRIVATE(KCalendarSystemJulian)
00081 };
00082 
00083 #endif // KCALENDARSYSTEMJULIAN_H

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal