[Kde-pim] KDateEdit and KTimeEdit

John Layt johnlayt at googlemail.com
Tue May 10 00:26:31 BST 2011


Hi,

With the feature freeze looming it must be time for that perennial discussion 
about the fate of KDateEdit and KTimeEdit :-)  Well, this time we have 
progress, albeit in a bit of a rush.  I've spent the last 2 days looking at it 
and decided that I won't just copy the existing code as is but have instead 
started writing a replacement that borrows heavily from the existing widgets 
but also from QDateTimeEdit.  I've now pushed this work branch to 
kdelibs/kdeui/kdatetimeedit for people to have a poke at.

Main points:
1) Merger of the QDateTimeEdit api and KDateEdit/KTimeEdit api
2) Derived only from QWidget not QComboBox or QSpinBox, leaves us free to 
change the implementation later
3) KDateTimeEdit is the base class with the Date and Time only version derived 
from it, makes for a single intergrated implementation not 3 separate ones.
4) Uses KDateTime internally so is timezone aware, so includes an optional 
timezone picker too
5) Doesn't have separate classes for KDatePickerPopup or KTimeZoneCombo (yet), 
most stuff is just in the base class I don't have the time now to design clean 
generic classes for inclusion in kdelibs, but these can evolve out from 
KDateTimeEdit in 4.8.

The work branch is about 50% finished, it displays OK but there's no 
interaction or validation.  I hope to have enough done by end of Wednesday to 
make the freeze, a few bugs I can live with during betas.  Any help/advice 
would be appreciated as I'm not really a gui guy  :-)  Feel free to push 
changes.

Some queries:
1) Do we stick with the KDateTimeEdit class name?  It implies it's a drop-in 
replacement for QDateTimeEdit which the api is but its's not a derived class.
2) Is there a nicer way to do the date picker pop-up?
3) Any more timezone api needed, such as manually adding extra tz's to 
display?
4) Any virtuals I need to add to all kdepim to derive new classes from it?

Cheers!

John.
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list