[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: [Kde-pim] [PATCH] Recurrences
From: Reinhold Kainhofer <reinhold () kainhofer ! com>
Date: 2005-06-30 23:39:06
Message-ID: 200507010139.06735.reinhold () kainhofer ! com
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
Hi guys,
Here is the patch for libkcal, which implements recurrences much better:
http://www.fam.tuwien.ac.at/~reinhold/KOrganizer/RecurrenceRule/
I've also created the patches for the affected apps (KAlarm, Kitchensync,
KMobile, KOrganizer, KPilot and KResources). I haven't been able to test them
all, but at least they compile ;-)
The patch is split up into several patches, one for each affected application.
There's also one large patch available for all changes to kdepim.
I'd like to commit this weekend so that we have enough time to test (and next
week is the first week after the semester at university, so most of the
stress is over for now and I can spend a little more time on coding). So if
you have any objections please tell me ASAP.
I might add that these patches will probably still have some bugs, that I
missed so far... I wrote lots of test cases, so the methods to calculate the
recurrence dates should work, but the API changes might still introduce nasty
bugs.
Here's a very quick and incomplete overview of what is implemented by this
patch. There might not be a UI to edit all these possibilities, but at least
the library supports them so we can correctly read all this stuff and show
the events at the correct time in korganizer (and in all other apps). And who
knows, we might add a UI sooner or later, too:
1) EXRULES are implemented
2) RDATES are implemented
3) all BY* combinations are allowed in the rule (e.g. all fridays the 13th)
4) BYSETPOS implemented (e.g. n-th weekday of the month)
5) exDates are no longer part of the event itself, but part of the recurrence
(*ALL* recurrence-related things are consistently accessible through the
event->recurrence() )
6) API cleanup
The API of the recurrences stayed very similar to the old one, with several
exceptions:
-) The end date / duration are no longer part of
the ::setDaily, ::setWeekly,etc. methods, but have their own methods
(setEndDate, setDuration). By default, infinite recurrence is used if none of
these two methods is called
-) For monthly and yearly recurrences, we don't need the specific type (date
vs. nth weekday) in the setMontly/setYearly any more. After you call
setMonthly( freq ) or setWeekly( freq ), you can call addMonthlyDay(..) or
addMonthlyDate(..) or addYearlyMonth(...) or addYearlyDay(...) (for n-th day
of year) or addYearlyDate(...) (for n-th day of the given month).
-) Instead of our old uint doesRecur(), which also returned the type of the
recurrence, i changed this to two methods: bool doesRecur() and uint
recurrenceType(), which should be self-explaining.
-) I got rid of the February 29 setting, because all three possibilities (to
recur on Feb 28, Feb 29 or March 1) can be implemented by ordinary recurrence
settings. No need to add another config flag for this.
-) Instead of QPtrList<int>, I'm now using QValueList<int> for everything.
Some things are not fully working yet:
1) recurring to-dos are probably very broken (I'll need to fix this, but the
current implement doesn't seem to be rfc-compliant, so I'll need to do
something about recurrint to-dos anyway).
2) It's not yet fully rfc2445-compliant (for some weird combinations that
involve n-th BYDAY with some other BY* rule (other than BYMONTH!), the
recurrence days are not correctly determined)
3) Duration across daylight time changes doesn't work correctly, because our
dates don't include the time zone yet (that's a general problem of libkcal).
4) Changes in the recurrence rule don't trigger the event's update yet. I
don't want to pass the Incidence* pointer to the recurrence rule (I'd like to
keep the recurrence issues completely separated from the incidence class)...
If we get rid of the Incidence* pointer, we can safely add copying for
recurrences and then I suppose kalarm could get rid of several hundred lines
of code, which just implements copying of recurrence data...
The affected files are:
kalarm/alarmevent.cpp | 218
kalarm/alarmevent.h | 21
kalarm/dcophandler.cpp | 4
kalarm/kalarmapp.cpp | 2
kalarm/recurrenceedit.cpp | 44
kitchensync/libkonnector2/plugins/qtopia/datebook.cpp | 58
kitchensync/libkonnector2/plugins/qtopia/metacalendar.cpp | 2
kitchensync/libksync/calendarmerger.cpp | 2
kmobile/devices/gnokii/gnokii_mobile.cpp | 2
korganizer/calendarview.cpp | 3
korganizer/koagendaview.cpp | 10
korganizer/kodaymatrix.cpp | 3
korganizer/koeditorrecurrence.cpp | 257
korganizer/komonthview.cpp | 2
korganizer/printing/calprinthelper.cpp | 8
kpilot/conduits/vcalconduit/vcal-conduit.cc | 77
kpilot/lib/Makefile.am | 2
kpilot/lib/pilotDateEntry.cc | 2
kresources/egroupware/kcal_resourcexmlrpc.cpp | 125
kresources/groupwise/soap/incidenceconverter.cpp | 85
kresources/kolab/kcal/incidence.cpp | 89
kresources/newexchange/exchangeconvertercalendar.cpp | 6
kresources/slox/kcalresourceslox.cpp | 25
libkcal/Makefile.am | 2
libkcal/calendar.cpp | 10
libkcal/calendarlocal.cpp | 32
libkcal/calformat.cpp | 24
libkcal/calformat.h | 2
libkcal/compat.cpp | 112
libkcal/compat.h | 12
libkcal/icalformat.cpp | 7
libkcal/icalformat.h | 6
libkcal/icalformatimpl.cpp | 778 --
libkcal/icalformatimpl.h | 10
libkcal/incidence.cpp | 166
libkcal/incidence.h | 95
libkcal/incidenceformatter.cpp | 28
libkcal/kcalversion.h | 4
libkcal/qtopiaformat.cpp | 28
libkcal/recurrence.cpp | 3819 ++------------
libkcal/recurrence.h | 429 -
libkcal/resourcekabc.cpp | 12
libkcal/tests/Makefile.am | 58
libkcal/tests/checkcalendar.pl | 123
libkcal/tests/testincidence.cpp | 3
libkcal/tests/testincidencegenerator.h | 3
libkcal/todo.cpp | 2
libkcal/vcalformat.cpp | 210
libkdepim/calendardiffalgo.cpp | 5
libkpimexchange/core/exchangedownload.cpp | 20
libkpimexchange/core/exchangeupload.cpp | 6
51 files changed, 2011 insertions(+), 5042 deletions(-)
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, Vienna, Austria
email: reinhold@kainhofer.com, http://reinhold.kainhofer.com/
* Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at
* K Desktop Environment, http://www.kde.org/, KOrganizer / KPilot maintainer
[Attachment #5 (application/pgp-signature)]
_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic