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

tdecore

  • tdecore
kcalendarsystem.h
1 /*
2  Copyright (c) 2002 Carlos Moro <cfmoro@correo.uniovi.es>
3  Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KCALENDARSYSTEM_H
22 #define KCALENDARSYSTEM_H
23 
24 #include <tqdatetime.h>
25 #include <tqstring.h>
26 #include "tdelibs_export.h"
27 
28 class TDELocale;
29 
30 class KCalendarSystemPrivate;
31 
42 class TDECORE_EXPORT KCalendarSystem
43 {
44 public:
50  KCalendarSystem(const TDELocale * locale = 0);
51 
55  virtual ~KCalendarSystem();
56 
63  virtual int year (const TQDate & date) const = 0;
64 
72  virtual TQString yearString(const TQDate & pDate, bool bShort) const;
73 
81  virtual int yearStringToInteger(const TQString & sNum, int & iLength) const;
82 
89  virtual int month (const TQDate & date) const = 0;
90 
98  virtual TQString monthString(const TQDate & pDate, bool bShort) const;
99 
107  virtual int monthStringToInteger(const TQString & sNum, int & iLength) const;
108 
115  virtual int day (const TQDate & date) const = 0;
116 
124  virtual TQString dayString(const TQDate & pDate, bool bShort) const;
125 
133  virtual int dayStringToInteger(const TQString & sNum, int & iLength) const;
134 
142  virtual int dayOfWeek (const TQDate & date) const = 0;
143 
150  virtual int dayOfYear (const TQDate & date) const = 0;
151 
162  virtual bool setYMD(TQDate & date, int y, int m, int d) const = 0;
163 
171  virtual TQDate addYears(const TQDate & date, int nyears) const = 0;
172 
180  virtual TQDate addMonths(const TQDate & date, int nmonths) const = 0;
181 
189  virtual TQDate addDays(const TQDate & date, int ndays) const = 0;
190 
197  virtual int monthsInYear (const TQDate & date) const = 0;
198 
205  virtual int daysInYear (const TQDate & date) const = 0;
206 
213  virtual int daysInMonth (const TQDate & date) const = 0;
214 
221  virtual int weeksInYear(int year) const = 0;
222 
230  virtual int weekNumber(const TQDate& date, int * yearNum = 0) const = 0;
231 
241  virtual TQString monthName (int month, int year, bool shortName = false) const = 0;
242 
250  virtual TQString monthName (const TQDate & date, bool shortName = false ) const = 0;
251 
264  virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const = 0;
265 
276  virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false) const = 0;
277 
286  virtual TQString weekDayName (int weekDay, bool shortName = false) const = 0;
287 
295  virtual TQString weekDayName (const TQDate & date, bool shortName = false) const = 0;
296 
303  virtual int minValidYear () const = 0;
304 
311  virtual int maxValidYear () const = 0;
312 
318  virtual int weekDayOfPray () const = 0;
319 
323  virtual TQString calendarName() const = 0;
324 
330  virtual bool isLunar() const = 0;
331 
337  virtual bool isLunisolar() const = 0;
338 
344  virtual bool isSolar() const = 0;
345 
346 protected:
351  const TDELocale * locale() const;
352 
353 private:
354  KCalendarSystemPrivate * d;
355 };
356 
357 #endif
KCalendarSystem
CalendarSystem abstract class, default derived kde gregorian class and factory class.
Definition: kcalendarsystem.h:43
KCalendarSystem::maxValidYear
virtual int maxValidYear() const =0
Gets the maximum year value supported by specific calendar type algorithms (TQDate,...
KCalendarSystem::addYears
virtual TQDate addYears(const TQDate &date, int nyears) const =0
Returns a TQDate object containing a date nyears later.
KCalendarSystem::monthNamePossessive
virtual TQString monthNamePossessive(int month, int year, bool shortName=false) const =0
Returns a string containing the possessive form of the month name.
KCalendarSystem::weekDayName
virtual TQString weekDayName(const TQDate &date, bool shortName=false) const =0
Gets specific calendar type week day name.
KCalendarSystem::isLunisolar
virtual bool isLunisolar() const =0
Gets if the calendar is lunisolar based.
KCalendarSystem::dayOfYear
virtual int dayOfYear(const TQDate &date) const =0
Gets specific calendar type day number of year for a given date.
KCalendarSystem::weekDayOfPray
virtual int weekDayOfPray() const =0
Gets the day of the week traditionaly associated with pray.
KCalendarSystem::monthNamePossessive
virtual TQString monthNamePossessive(const TQDate &date, bool shortName=false) const =0
Returns a string containing the possessive form of the month name.
KCalendarSystem::monthsInYear
virtual int monthsInYear(const TQDate &date) const =0
Gets specific calendar type number of month for a given year.
KCalendarSystem::dayOfWeek
virtual int dayOfWeek(const TQDate &date) const =0
Gets specific calendar type number of day of week number for a given date.
KCalendarSystem::isSolar
virtual bool isSolar() const =0
Gets if the calendar is solar based.
KCalendarSystem::daysInMonth
virtual int daysInMonth(const TQDate &date) const =0
Gets specific calendar type number of days in month for a given date.
KCalendarSystem::monthName
virtual TQString monthName(const TQDate &date, bool shortName=false) const =0
Gets specific calendar type month name for a given gregorian date.
KCalendarSystem::weekNumber
virtual int weekNumber(const TQDate &date, int *yearNum=0) const =0
Gets specific calendar type week number for a given date.
KCalendarSystem::day
virtual int day(const TQDate &date) const =0
Gets specific calendar type day number of month for a given date.
KCalendarSystem::calendarName
virtual TQString calendarName() const =0
Gets the string representing the calendar.
KCalendarSystem::addDays
virtual TQDate addDays(const TQDate &date, int ndays) const =0
Returns a TQDate object containing a date ndays later.
KCalendarSystem::weeksInYear
virtual int weeksInYear(int year) const =0
Gets the number of weeks in a specified year.
KCalendarSystem::month
virtual int month(const TQDate &date) const =0
Gets specific calendar type month for a given gregorian date.
KCalendarSystem::minValidYear
virtual int minValidYear() const =0
Gets the first year value supported by specific calendar type algorithms.
KCalendarSystem::daysInYear
virtual int daysInYear(const TQDate &date) const =0
Gets the number of days in date whose years specified.
KCalendarSystem::isLunar
virtual bool isLunar() const =0
Gets if the calendar is lunar based.
KCalendarSystem::monthName
virtual TQString monthName(int month, int year, bool shortName=false) const =0
Gets specific calendar type month name for a given month number If an invalid month is specified,...
KCalendarSystem::setYMD
virtual bool setYMD(TQDate &date, int y, int m, int d) const =0
Changes the date's year, month and day.
KCalendarSystem::year
virtual int year(const TQDate &date) const =0
Gets specific calendar type year for a given gregorian date.
KCalendarSystem::addMonths
virtual TQDate addMonths(const TQDate &date, int nmonths) const =0
Returns a TQDate object containing a date nmonths later.
TDELocale
TDELocale provides support for country specific stuff like the national language.
Definition: tdelocale.h:124

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.9.1
This website is maintained by Timothy Pearson.