• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KDECore

kcalendarsystem.h

Go to the documentation of this file.
00001 /*
00002    Copyright (c) 2002 Carlos Moro <cfmoro@correo.uniovi.es>
00003    Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KCALENDARSYSTEM_H
00022 #define KCALENDARSYSTEM_H
00023 
00024 #include <qdatetime.h>
00025 #include <qstring.h>
00026 #include "kdelibs_export.h"
00027 
00028 class KLocale;
00029 
00030 class KCalendarSystemPrivate;
00031 
00042 class KDECORE_EXPORT KCalendarSystem
00043 {
00044 public:
00050   KCalendarSystem(const KLocale * locale = 0);
00051 
00055   virtual ~KCalendarSystem();
00056 
00063   virtual int year (const QDate & date) const = 0;
00064 
00072   virtual QString yearString(const QDate & pDate, bool bShort) const;
00073 
00081   virtual int yearStringToInteger(const QString & sNum, int & iLength) const;
00082 
00089   virtual int month (const QDate & date) const = 0;
00090 
00098   virtual QString monthString(const QDate & pDate, bool bShort) const;
00099 
00107   virtual int monthStringToInteger(const QString & sNum, int & iLength) const;
00108 
00115   virtual int day (const QDate & date) const = 0;
00116 
00124   virtual QString dayString(const QDate & pDate, bool bShort) const;
00125 
00133   virtual int dayStringToInteger(const QString & sNum, int & iLength) const;
00134 
00142   virtual int dayOfWeek (const QDate & date) const = 0;
00143 
00150   virtual int dayOfYear (const QDate & date) const = 0;
00151 
00162   virtual bool setYMD(QDate & date, int y, int m, int d) const = 0;
00163 
00171   virtual QDate addYears(const QDate & date, int nyears) const = 0;
00172 
00180   virtual QDate addMonths(const QDate & date, int nmonths) const = 0;
00181 
00189   virtual QDate addDays(const QDate & date, int ndays) const = 0;
00190 
00197   virtual int monthsInYear (const QDate & date) const = 0;
00198 
00205   virtual int daysInYear (const QDate & date) const = 0;
00206 
00213   virtual int daysInMonth (const QDate & date) const = 0;
00214 
00221   virtual int weeksInYear(int year) const = 0;
00222 
00230   virtual int weekNumber(const QDate& date, int * yearNum = 0) const = 0;
00231 
00241   virtual QString monthName (int month, int year, bool shortName = false) const = 0;
00242 
00250   virtual QString monthName (const QDate & date, bool shortName = false ) const = 0;
00251 
00264   virtual QString monthNamePossessive(int month, int year, bool shortName = false) const = 0;
00265 
00276   virtual QString monthNamePossessive(const QDate & date, bool shortName = false) const = 0;
00277 
00286   virtual QString weekDayName (int weekDay, bool shortName = false) const = 0;
00287 
00295   virtual QString weekDayName (const QDate & date, bool shortName = false) const = 0;
00296 
00303   virtual int minValidYear () const = 0;
00304 
00311   virtual int maxValidYear () const = 0;
00312 
00318   virtual int weekDayOfPray () const = 0;
00319 
00323   virtual QString calendarName() const = 0;
00324 
00330   virtual bool isLunar() const = 0;
00331 
00337   virtual bool isLunisolar() const = 0;
00338 
00344   virtual bool isSolar() const = 0;
00345 
00346 protected:
00351   const KLocale * locale() const;
00352 
00353 private:
00354   KCalendarSystemPrivate * d;
00355 };
00356 
00357 #endif

KDECore

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
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