diff --git a/declarativeimports/locale/calendarsystem.cpp b/declarativeimports/locale/calendarsystem.cpp index c05174bf7..415d963b6 100644 --- a/declarativeimports/locale/calendarsystem.cpp +++ b/declarativeimports/locale/calendarsystem.cpp @@ -473,33 +473,3 @@ int CalendarSystem::weekStartDay() const { return m_calendarSystem->weekStartDay(); } - -// Dummy version using Gregorian as an example -// This method MUST be re-implemented in any new Calendar System -// The implementation MUST NOT do validity checking on date ranges, all calls to this function MUST -// instead be wrapped in validity checks, as sometimes we want this to work outside the public valid -// range, i.e. to allow us to internally set dates of 1/1/10000 which are not publically valid but -// are required for internal maths -bool CalendarSystem::julianDayToDate(int jd, int &year, int &month, int &day) const -{ - return m_calendarSystem->julianDayToDate(jd, year, month, day); -} - -// Dummy version using Gregorian as an example -// This method MUST be re-implemented in any new Calendar System -// The implementation MUST NOT do validity checking on date ranges, all calls to this function MUST -// instead be wrapped in validity checks, as sometimes we want this to work outside the public valid -// range, i.e. to allow us to internally set dates of 1/1/10000 which are not publically valid but -// are required for internal maths -bool CalendarSystem::dateToJulianDay(int year, int month, int day, int &jd) const -{ - return m_calendarSystem->dateToJulianDay(year, month, day, jd); -} - -//FIXME what should I do with the above one? -/*const KLocale * CalendarSystem::locale() const -{ - Q_D(const KCalendarSystem); - - return d->locale(); -}*/ diff --git a/declarativeimports/locale/calendarsystem.h b/declarativeimports/locale/calendarsystem.h index c00649c47..9c07aceeb 100644 --- a/declarativeimports/locale/calendarsystem.h +++ b/declarativeimports/locale/calendarsystem.h @@ -1146,78 +1146,6 @@ public: */ Q_INVOKABLE virtual bool isProleptic() const = 0; -protected: - - /** - * Internal method to convert a Julian Day number into the YMD values for - * this calendar system. - * - * All calendar system implementations MUST implement julianDayToDate and - * dateToJulianDay methods as all other methods can be expressed as - * functions of these. Does no internal validity checking. - * - * @see KCalendarSystem::dateToJulianDay - * - * @param jd Julian day number to convert to date - * @param year year number returned in this variable - * @param month month number returned in this variable - * @param day day of month returned in this variable - * @return @c true if the date is valid, @c false otherwise - */ - Q_INVOKABLE virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const = 0; - - /** - * Internal method to convert YMD values for this calendar system into a - * Julian Day number. - * - * All calendar system implementations MUST implement julianDayToDate and - * dateToJulianDay methods as all other methods can be expressed as - * functions of these. Does no internal validity checking. - * - * @see KCalendarSystem::julianDayToDate - * - * @param year year number - * @param month month number - * @param day day of month - * @param jd Julian day number returned in this variable - * @return @c true if the date is valid, @c false otherwise - */ - Q_INVOKABLE virtual bool dateToJulianDay(int year, int month, int day, int &jd) const = 0; - - /** - * Returns the locale used for translations and formats for this - * calendar system instance. This allows a calendar system instance to be - * independent of the global translations and formats if required. All - * implementations must refer to this locale. - * - * Only for internal calendar system use; if public access is required then - * provide public methods only for those methods actually required. Any - * app that creates an instance with its own locale overriding global will - * have the original handle to the locale and can manipulate it that way if - * required, e.g. to change default date format. Only expose those methods - * that library widgets require access to internally. - * - * @see KCalendarSystem::formatDate - * @see Locale::formatDate - * @see KCalendarSystem::weekStartDay - * @see Locale::weekStartDay - * @see KCalendarSystem::readDate - * @see Locale::readDate - * - * @return locale to use - */ - Q_INVOKABLE const KLocale *locale() const; - - /** - * Constructor of abstract calendar class. This will be called by derived classes. - * - * @param dd derived private d-pointer. - * @param config a configuration file with a 'KCalendarSystem %calendarName' group detailing - * locale-related preferences (such as era options). The global config is used - if null. - * @param locale locale to use for translations. The global locale is used if null. - */ - private: //FIXME When it comes the time to create wrappers for the above //classes will i need the "friend class foo"???