Chinese Lunar Calendar Support in Kdelibs

F H bbluldd at gmail.com
Wed Nov 10 05:36:45 GMT 2010


Hi all,

It has been quite a few years since Liang Qi tried to add Chinese lunar
calendar support in the kdelibs ( see
http://lists.kde.org/?t=119817976300004 ) .

Recently, I tried some effort to patch my local kdelibs (4.5.1) to get the
lunar calendar supported. I would like to forward my patches to see if we
can advance the job.

There are two patches.

The first one adds KCalendarSystemChinese to kdelibs.
1. All the routines(from ccal-2.5.2) needed for the lunar calendar
computation are encapsulated as the "ChineseLunarCalendarSystem" class.
2. The traditional (printed) Chinese calendar is the Gregorian calendar with
each day annotated by its Lunar day in Chinese characters.  So The
KCalendarSystemChinese is basically the Gregorian calendar, with the Chinese
Lunar day information(utf8 coded) added to the function call dayString(
const QDate &pDate, ShortFormat ). Each day string obtained includes two
lines, one for Gregorian day, one for Chinese Lunar day. (The function
dayString( const QDate &pDate, ShortFormat ) is actually called when we want
to get a day string to display in the plasma calendar table. )

Since there are two lines obtained from dayString(), the plasma calendar
widgets has problems to display it. The cell contents is too crowded, or
font size is too large.
The second patch
1. adds a font scale factor in the configuration UI, so that users can scale
down the font size in the calendar table
2. helps to remember the popup calendar size, so that the popup widget won't
be reset to it's default minimum size each time kde is restarted.



Regards,

Feng Huang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20101110/d596c570/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.kdelibs-4.5-ChineseLunarCalendar_0.1.patch
Type: text/x-patch
Size: 320123 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20101110/d596c570/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.kdebase-workspace-4.5-calendartableFontScale_clockappletPopupSize_0.1.patch
Type: text/x-patch
Size: 10379 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20101110/d596c570/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChineseLunarCalendar_with_patch_1.jpg
Type: image/jpeg
Size: 55788 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20101110/d596c570/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChineseLunarCalendar_with_patch_1_and_2.jpg
Type: image/jpeg
Size: 61211 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20101110/d596c570/attachment-0001.jpg>


More information about the kde-core-devel mailing list