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

KDECore

kcalendarsystemcoptic_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 KCALENDARSYSTEMCOPTIC_H
00021 #define KCALENDARSYSTEMCOPTIC_H
00022 
00023 #include "kcalendarsystem.h"
00024 
00025 class KCalendarSystemCopticPrivate;
00026 
00037 class KCalendarSystemCoptic: public KCalendarSystem
00038 {
00039 public:
00040     explicit KCalendarSystemCoptic( const KLocale *locale = 0 );
00041     explicit KCalendarSystemCoptic( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
00042     virtual ~KCalendarSystemCoptic();
00043 
00044     virtual QString calendarType() const;
00045 
00046     virtual QDate epoch() const;
00047     virtual QDate earliestValidDate() const;
00048     virtual QDate latestValidDate() const;
00049     virtual bool isValid( int year, int month, int day ) const;
00050     virtual bool isValid( const QDate &date ) const;
00051 
00052     virtual bool setDate( QDate &date, int year, int month, int day ) const;
00054     virtual bool setYMD( QDate &date, int year, int month, int day ) const;
00055 
00056     virtual int year( const QDate &date ) const;
00057     virtual int month( const QDate &date ) const;
00058     virtual int day( const QDate &date ) const;
00059 
00060     virtual QDate addYears( const QDate &date, int nyears ) const;
00061     virtual QDate addMonths( const QDate &date, int nmonths ) const;
00062     virtual QDate addDays( const QDate &date, int ndays ) const;
00063 
00064     virtual int monthsInYear( const QDate &date ) const;
00065     virtual int weeksInYear( const QDate &date ) const;
00066     virtual int weeksInYear( int year ) const;
00067     virtual int daysInYear( const QDate &date ) const;
00068     virtual int daysInMonth( const QDate &date ) const;
00069     virtual int daysInWeek( const QDate &date ) const;
00070 
00071     virtual int dayOfYear( const QDate &date ) const;
00072     virtual int dayOfWeek( const QDate &date ) const;
00073 
00074     virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
00075 
00076     virtual bool isLeapYear( int year ) const;
00077     virtual bool isLeapYear( const QDate &date ) const;
00078 
00079     virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
00080     virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
00081 
00082     virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
00083     virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
00084 
00085     virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
00086     virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
00087     virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
00088 
00089     virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
00090     virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
00091     virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
00092 
00093     virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
00094 
00095     virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
00096     virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
00097     virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
00098 
00099     virtual int weekStartDay() const;
00100     virtual int weekDayOfPray () const;
00101 
00102     virtual bool isLunar() const;
00103     virtual bool isLunisolar() const;
00104     virtual bool isSolar() const;
00105     virtual bool isProleptic() const;
00106 
00107 protected:
00108     virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
00109     virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
00110     KCalendarSystemCoptic( KCalendarSystemCopticPrivate &dd, const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
00111                            const KLocale *locale = 0 );
00112 
00113 private:
00114     Q_DECLARE_PRIVATE( KCalendarSystemCoptic )
00115     KCalendarSystemCopticPrivate * const dont_use; // KDE5 remove, use shared d
00116 };
00117 
00118 #endif // KCALENDARSYSTEMCOPTIC_H

KDECore

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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.3
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