[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: Re: [Kde-pim] About non-gregorian calendar systems
From: "Aaron J. Seigo" <aseigo () olympusproject ! org>
Date: 2002-02-26 17:33:51
[Download RAW message or body]
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 ... =)
--
Aaron Seigo
_______________________________________________
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/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic