• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

kcalendarsystem.h
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 <tqdatetime.h>
00025 #include <tqstring.h>
00026 #include "tdelibs_export.h"
00027 
00028 class TDELocale;
00029 
00030 class KCalendarSystemPrivate;
00031 
00042 class TDECORE_EXPORT KCalendarSystem
00043 {
00044 public:
00050   KCalendarSystem(const TDELocale * locale = 0);
00051 
00055   virtual ~KCalendarSystem();
00056 
00063   virtual int year (const TQDate & date) const = 0;
00064 
00072   virtual TQString yearString(const TQDate & pDate, bool bShort) const;
00073 
00081   virtual int yearStringToInteger(const TQString & sNum, int & iLength) const;
00082 
00089   virtual int month (const TQDate & date) const = 0;
00090 
00098   virtual TQString monthString(const TQDate & pDate, bool bShort) const;
00099 
00107   virtual int monthStringToInteger(const TQString & sNum, int & iLength) const;
00108 
00115   virtual int day (const TQDate & date) const = 0;
00116 
00124   virtual TQString dayString(const TQDate & pDate, bool bShort) const;
00125 
00133   virtual int dayStringToInteger(const TQString & sNum, int & iLength) const;
00134 
00142   virtual int dayOfWeek (const TQDate & date) const = 0;
00143 
00150   virtual int dayOfYear (const TQDate & date) const = 0;
00151 
00162   virtual bool setYMD(TQDate & date, int y, int m, int d) const = 0;
00163 
00171   virtual TQDate addYears(const TQDate & date, int nyears) const = 0;
00172 
00180   virtual TQDate addMonths(const TQDate & date, int nmonths) const = 0;
00181 
00189   virtual TQDate addDays(const TQDate & date, int ndays) const = 0;
00190 
00197   virtual int monthsInYear (const TQDate & date) const = 0;
00198 
00205   virtual int daysInYear (const TQDate & date) const = 0;
00206 
00213   virtual int daysInMonth (const TQDate & date) const = 0;
00214 
00221   virtual int weeksInYear(int year) const = 0;
00222 
00230   virtual int weekNumber(const TQDate& date, int * yearNum = 0) const = 0;
00231 
00241   virtual TQString monthName (int month, int year, bool shortName = false) const = 0;
00242 
00250   virtual TQString monthName (const TQDate & date, bool shortName = false ) const = 0;
00251 
00264   virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const = 0;
00265 
00276   virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false) const = 0;
00277 
00286   virtual TQString weekDayName (int weekDay, bool shortName = false) const = 0;
00287 
00295   virtual TQString weekDayName (const TQDate & 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 TQString 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 TDELocale * locale() const;
00352 
00353 private:
00354   KCalendarSystemPrivate * d;
00355 };
00356 
00357 #endif

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.