From kde-pim Wed Feb 27 05:41:52 2002 From: Frans de Wet Date: Wed, 27 Feb 2002 05:41:52 +0000 To: kde-pim Subject: Re: [Kde-pim] About non-gregorian calendar systems X-MARC-Message: https://marc.info/?l=kde-pim&m=101478880010463 I agree that this really looks like a good solution. I am trying to make sense of it and use it now ;-) hehe This is why I enjoy active mailing lists! Frans On Tuesday 26 February 2002 15:16, Cornelius Schumacher wrote: > On Tuesday 26 February 2002 18:33, Aaron J. Seigo wrote: > > hi.. > > > > > All code uses the abstract CalendarSystem interface. There is only > > > one place, where the specifig GreogrianSystem or ChineseSystem is > > > used, when the object is instantiated (based on user selection). > > > > if you provided a factory method that returns an object of the > > correct CalendarSystem subclass based on a QString identifier, then > > you would alleviate the need for Frans to haveany knowledge of the > > specific subclasses in his code. > > > > provide a seperate factory method to return a QStringList (or > > whatever) of all available CalendarSystem types so that the user can > > be presented with their choices, and this would allow one to write a > > calendar interface without ever worrying about what the various > > systems are. > > > > something like: > > > > class CalendarSystem > > { > > public: > > static CalendarSystem* calendarFactory(QString system); > > static const QStringList& availableSystems(); > > } > > > > this would also allow for the future addition of calendarSystem > > plugins that are loaded are run time. > > > > just a thought from my early morning brain ... =) > > This is a good one :-) _______________________________________________ kde-pim mailing list kde-pim@mail.kde.org http://mail.kde.org/mailman/listinfo/kde-pim kde-pim home page at http://pim.kde.org/