[Development] QCalendar and QCalendarBackend questions
Wang Gary
wzc782970009 at gmail.com
Fri Dec 25 17:40:22 CET 2020
Hello,
I'd like to add an "alternate calendar system" to KDE's calendar
applet, which, for example, will be able to allow users set to
display a Chinese Lunar Calendar in the same MonthView as
the main Gregorian calendar dates. Then QCalendar seems to
be a good choice to use, then I found there are some questions
related to the API of QCalendar, and would like to discuss it here,
hope I come to the right place, please let me know if not.
The first issue is, in order to get QCalendar support a new
calendar system, it seems like I need to subclass
QCalendarBackend first, which is a private Qt API. Is that correct?
If so, is there any plan to make it public? If not, I hope there can
be a way to add custom calendar systems in a way similar to
what Qt's imageformats plugin does.
The second issue is, for example, Traditional Chinese calendar
have their own (localized) day name, the first day of a month
names "初一" and the 22nd day of the month names "廿二". It
seems there are functions that can be used to get the localized
month name and weekday name, but seems there is no function
provided to get a localized day name. Is that correct? If so, can
we add such a feature to QCalendar?
Also, currently, QCalendar doesn't seem to be able to get the
Cyclic year name and also get to know if the given month is
leap month. I'm not sure if it's by design since
QCalendar::monthName() mentioned that issue. Then it seems
we are able to get the localized month name which can indicate
it's a leap month or not to the user, but not able to know if it's a
leap month from the API.
By the way, is there any plan to introduce the Chinese calendar
system support in official Qt release?
That's all that I want to ask now.
Thanks for reading and have a nice holiday :)
Gary Wang
---
btw, some link related to this feature discussion:
plasma-devel discussion thread:
https://mail.kde.org/pipermail/plasma-devel/2020-December/118960.html
KDE bug tracker: https://bugs.kde.org/show_bug.cgi?id=429892
More information about the Development
mailing list