calendarsystem Library API Documentation

KCalendarSystem Class Reference

CalendarSystem abstract class, default derived kde gregorian class and factory class. More...

#include <kcalendarsystem.h>

Inheritance diagram for KCalendarSystem:

KCalendarSystemGregorian KCalendarSystemHijri List of all members.

Public Member Functions

virtual QString monthName (const QDate &date, bool shortName=false)=0
 Gets specific calendar type month name for a given gregorian date.

virtual int year (const QDate &date)=0
 Gets specific calendar type year for a given gregorian date.

virtual int month (const QDate &date)=0
 Gets specific calendar type month for a given gregorian date.

virtual QString formatDate (const QDate &date)=0
 Gets specific calendar type day/month/year formatted text date for a given gregorian date.

virtual void nextMonthDate (QDate &date)=0
 Gets specific calendar type (its gregorian equivalent) next month date for a given gregorian date.

virtual void previousMonthDate (QDate &date)=0
 Gets specific calendar type (its gregorian equivalent) previous month date for a given gregorian date.

virtual void nextYearDate (QDate &date)=0
 Gets specific calendar type next year date (its gregorian equivalent) for a given gregorian date.

virtual void previousYearDate (QDate &date)=0
 Gets specific calendar type (its gregorian equivalent) previous year date for a given gregorian date.

virtual int monthsInYear (int year)=0
 Gets specific calendar type number of month for a given year.

virtual QString monthName (int month)=0
 Gets specific calendar type month name.

virtual void constructDateInMonth (QDate &date, int month)=0
 Given a month, construct a valid date in given date's year.

virtual void constructDateInYear (QDate &date, int year)=0
 Given a year, construct a valid date.

virtual QDate parseDate (QString text)=0
 Convert a formatted day/month/year string to a valid date object.

virtual QString weekDayName (int col, bool shortName=false)=0
 Gets specific calendar type week day name.

virtual int dayOfTheWeek (const QDate &date)=0
 Gets specific calendar type number of day of week number for a given date.

virtual int numberOfDaysInMonth (const QDate &date)=0
 Gets specific calendar type number of days in month for a given date.

virtual int numberOfDaysPrevMonth (const QDate &date)=0
 Gets specific calendar type number of days in previous month for a given date.

virtual int maxValidYear ()=0
 Gets the maximum year value supported by specific calendar type algorithms (QDate, 8000).

virtual int day (const QDate &date)=0
 Gets specific calendar type day number in month for a given date.

virtual int numberOfDayInYear (const QDate &date)=0
 Gets specific calendar type day number in year for a given date.

virtual int weekDayOfPray ()=0
 Gets the day of the week traditionaly associated with pray.

virtual void printType ()=0
 Just a small debugging test ;).


Detailed Description

CalendarSystem abstract class, default derived kde gregorian class and factory class.

Provides support for different calendar types for kde calendar widget and related stuff.

Derived classes must be created through FactoryCalendar class

: Carlos Moro <cfmoro@correo.uniovi.es> : GNU-GPL v.2

Definition at line 17 of file kcalendarsystem.h.


Member Function Documentation

virtual QString KCalendarSystem::monthName const QDate date,
bool  shortName = false
[pure virtual]
 

Gets specific calendar type month name for a given gregorian date.

Parameters:
date gregorian date
Returns:
month name

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

Referenced by KDateInternalMonthPicker::paintCell(), KDatePicker::setDate(), and KDatePicker::setFontSize().

virtual int KCalendarSystem::year const QDate date  )  [pure virtual]
 

Gets specific calendar type year for a given gregorian date.

Parameters:
date gregorian date
Returns:
year

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

Referenced by KDatePicker::setDate().

virtual int KCalendarSystem::month const QDate date  )  [pure virtual]
 

Gets specific calendar type month for a given gregorian date.

Parameters:
date gregorian date
Returns:
month

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual QString KCalendarSystem::formatDate const QDate date  )  [pure virtual]
 

Gets specific calendar type day/month/year formatted text date for a given gregorian date.

Parameters:
date gregorian date
Returns:
formatted text date

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

Referenced by KDatePicker::setDate().

virtual void KCalendarSystem::nextMonthDate QDate date  )  [pure virtual]
 

Gets specific calendar type (its gregorian equivalent) next month date for a given gregorian date.

Parameters:
date date to be +1 month updated

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual void KCalendarSystem::previousMonthDate QDate date  )  [pure virtual]
 

Gets specific calendar type (its gregorian equivalent) previous month date for a given gregorian date.

Parameters:
date date to be -1 month updated

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual void KCalendarSystem::nextYearDate QDate date  )  [pure virtual]
 

Gets specific calendar type next year date (its gregorian equivalent) for a given gregorian date.

Parameters:
date date to be +1 year updated

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual void KCalendarSystem::previousYearDate QDate date  )  [pure virtual]
 

Gets specific calendar type (its gregorian equivalent) previous year date for a given gregorian date.

Parameters:
date date to be -1 year updated

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual int KCalendarSystem::monthsInYear int  year  )  [pure virtual]
 

Gets specific calendar type number of month for a given year.

Parameters:
year the year year
Returns:
number of months in that year

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual QString KCalendarSystem::monthName int  month  )  [pure virtual]
 

Gets specific calendar type month name.

Parameters:
month number of month in year
Returns:
month name

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual void KCalendarSystem::constructDateInMonth QDate date,
int  month
[pure virtual]
 

Given a month, construct a valid date in given date's year.

Parameters:
date date that indicates the year and whose value is updated
month month number which resulting date belongs to

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual void KCalendarSystem::constructDateInYear QDate date,
int  year
[pure virtual]
 

Given a year, construct a valid date.

Parameters:
date date whose value is updated
year year of the new date

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual QDate KCalendarSystem::parseDate QString  text  )  [pure virtual]
 

Convert a formatted day/month/year string to a valid date object.

Parameters:
text day/month/year string
Returns:
valid parsed date object

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual QString KCalendarSystem::weekDayName int  col,
bool  shortName = false
[pure virtual]
 

Gets specific calendar type week day name.

Parameters:
col number of day in week (1 -> Monday)
shortName short or complete day name
Returns:
day name

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

Referenced by KDateTable::paintCell(), and KDateTable::setFontSize().

virtual int KCalendarSystem::dayOfTheWeek const QDate date  )  [pure virtual]
 

Gets specific calendar type number of day of week number for a given date.

Parameters:
date gregorian date
Returns:
day of week

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

Referenced by KDateTable::setDate().

virtual int KCalendarSystem::numberOfDaysInMonth const QDate date  )  [pure virtual]
 

Gets specific calendar type number of days in month for a given date.

Parameters:
date gregorian date
Returns:
number of days for month in date

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

Referenced by KDateTable::setDate().

virtual int KCalendarSystem::numberOfDaysPrevMonth const QDate date  )  [pure virtual]
 

Gets specific calendar type number of days in previous month for a given date.

Parameters:
date gregorian date
Returns:
number of days for previous month of date

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

Referenced by KDateTable::setDate().

virtual int KCalendarSystem::maxValidYear  )  [pure virtual]
 

Gets the maximum year value supported by specific calendar type algorithms (QDate, 8000).

Returns:
maximum year supported

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual int KCalendarSystem::day const QDate date  )  [pure virtual]
 

Gets specific calendar type day number in month for a given date.

Parameters:
date gregorian date equivalent to the specific one
Returns:
day number

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

Referenced by KDateTable::contentsMousePressEvent(), and KDateTable::paintCell().

virtual int KCalendarSystem::numberOfDayInYear const QDate date  )  [pure virtual]
 

Gets specific calendar type day number in year for a given date.

Parameters:
date gregorian date equivalent to the specific one
Returns:
day number

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual int KCalendarSystem::weekDayOfPray  )  [pure virtual]
 

Gets the day of the week traditionaly associated with pray.

Returns:
day number

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.

virtual void KCalendarSystem::printType  )  [pure virtual]
 

Just a small debugging test ;).

Implemented in KCalendarSystemGregorian, and KCalendarSystemHijri.


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:46:51 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001