kcalendarsystem.h
/*
Copyright (c) 2002 Carlos Moro <cfmoro@correo.uniovi.es>
Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KCALENDARSYSTEM_H
#define KCALENDARSYSTEM_H
#include <qdatetime.h>
#include <qstring.h>
#include "kdelibs_export.h"
class KLocale;
class KCalendarSystemPrivate;
class KDECORE_EXPORT KCalendarSystem
{
public:
KCalendarSystem(const KLocale * locale = 0);
virtual ~KCalendarSystem();
virtual int year (const QDate & date) const = 0;
virtual QString yearString(const QDate & pDate, bool bShort) const;
virtual int yearStringToInteger(const QString & sNum, int & iLength) const;
virtual int month (const QDate & date) const = 0;
virtual QString monthString(const QDate & pDate, bool bShort) const;
virtual int monthStringToInteger(const QString & sNum, int & iLength) const;
virtual int day (const QDate & date) const = 0;
virtual QString dayString(const QDate & pDate, bool bShort) const;
virtual int dayStringToInteger(const QString & sNum, int & iLength) const;
virtual int dayOfWeek (const QDate & date) const = 0;
virtual int dayOfYear (const QDate & date) const = 0;
virtual bool setYMD(QDate & date, int y, int m, int d) const = 0;
virtual QDate addYears(const QDate & date, int nyears) const = 0;
virtual QDate addMonths(const QDate & date, int nmonths) const = 0;
virtual QDate addDays(const QDate & date, int ndays) const = 0;
virtual int monthsInYear (const QDate & date) const = 0;
virtual int daysInYear (const QDate & date) const = 0;
virtual int daysInMonth (const QDate & date) const = 0;
virtual int weeksInYear(int year) const = 0;
virtual int weekNumber(const QDate& date, int * yearNum = 0) const = 0;
virtual QString monthName (int month, int year, bool shortName = false) const = 0;
virtual QString monthName (const QDate & date, bool shortName = false ) const = 0;
virtual QString monthNamePossessive(int month, int year, bool shortName = false) const = 0;
virtual QString monthNamePossessive(const QDate & date, bool shortName = false) const = 0;
virtual QString weekDayName (int weekDay, bool shortName = false) const = 0;
virtual QString weekDayName (const QDate & date, bool shortName = false) const = 0;
virtual int minValidYear () const = 0;
virtual int maxValidYear () const = 0;
virtual int weekDayOfPray () const = 0;
virtual QString calendarName() const = 0;
virtual bool isLunar() const = 0;
virtual bool isLunisolar() const = 0;
virtual bool isSolar() const = 0;
protected:
const KLocale * locale() const;
private:
KCalendarSystemPrivate * d;
};
#endif
KCalendarSystem
CalendarSystem abstract class, default derived kde gregorian class and factory class.
Definition: kcalendarsystem.h:42
KLocale
KLocale provides support for country specific stuff like the national language.
Definition: klocale.h:124

KDE Home | KDE Accessibility Home | Description of Access Keys