[Kde-pim] Google Summer of Code Application - KMail

Thomas McGuire Thomas.McGuire at gmx.net
Sun Mar 30 22:26:58 BST 2008


Hi,

On Wednesday 26 March 2008, Szymon Stefanek wrote:
> I plan to apply as a student in Google Summer of Code and I've spotted
> the small paragraph about KMail in the ideas page.
>
> It's about improving the message view by supporting multiline text.
>
> I'm using KMail daily since years and I'd like to take care of the task
> and maybe contribute other code around. GSoC would be also my entry point
> to KDE development.
>
> The simple "multiline text" task IMHO might be too "small" for GSoC so my
> proposal contains more ideas and also a generic "help in the Qt4 port" to
> fill in the time span that may remain at the end of the project.
>
> I would like to have some feedback about the proposal
> and maybe some hint about a possible mentor.
I like the proposal, making the header view better and multi-line is 
definitely something very much wished for.
I would probably be available as a mentor, I'm the KMail maintainer.

> First of all I've played a bit with the current kmail trunk and came
> out with the following screenshots:
>
> 	http://labs.pragmaware.net/misc/kmailsnap1.png
> 	http://labs.pragmaware.net/misc/kmailsnap2.png
> 	http://labs.pragmaware.net/misc/kmailsnap3.png
> 	http://labs.pragmaware.net/misc/kmailsnap4.png
> 	http://labs.pragmaware.net/misc/kmailsnap5.png
>
> This is how a multiline message view could look like.
> The shots are obtained by hardcore hacks in the Qt3-compat
> headeritem painting code and by some gimping (4 and 5).
>
> Here are the keypoints of the application.
>
> - Create a message view with rich items.
>
> 	I'd actually like to have more than just multiline.
> 	Rich items that allow painting multiple text items and multiple
> 	pixmaps on multiple lines.
>
> 	In the screenshots you can see some examples. The sender is left aligned
> 	in the first line, the date is right aligned in the first line
> 	and the subject is left aligned and elided in the second line.
> 	We have more space so we also can display more state pixmaps.
>
> 	We could explore the possibility of grouping toplevel items.
> 	Examples of groups might be "Today", "Yesterday", "Last Week", "Last
> Month", "Search Results" etc... (see
> http://labs.pragmaware.net/misc/kmailsnap4.png for example).
>
> 	Multiline items would rule out simple sorting by clicking on the column.
> 	I'd be then tempted to remove the columns at all and specify sorting by a
> 	combo box. (still in http://labs.pragmaware.net/misc/kmailsnap4.png).
I'd like to still have the option of having old-style column-headers, but yes, 
for multiline items it is probably best to remove them. I wonder how Outlook 
or Thunderbird handle sorting then, might be worth to have a look there.

> 	This would allow for more sorting rulesets possibly more sophisticated.
> 	Sorting could include grouping rules as described above.
>
> 	All this stuff would require a custom widget to be defined. Well, we could
> 	use QTreeView but it would add several constraints to the ideas expressed
> 	above. With grouping it would be something similar to a specialized
> 	QTreeView with different kinds of rich-text items, no branches and no
> 	column headers.
>
> 	Implementing a totally custom widget could introduce problems with styling
> 	but would also allow for great optimisations: the message view must be
> fast.
I think we should still use a QTreeView, and use a QStyledItemDelegate[1] for 
the fancy multiline painting stuff. The advantage of using model/view stuff 
here is that we can reuse the message model of Akonadi once KMail gets ported 
to Akonadi, instead of rewriting it again. I think the Qt model/view stuff is 
powerful enough to handle the use cases above.
Have a look at KCategorizedSortFilterProxyModel[3] and KCategorizedView[2] in 
KDEUI for the grouping stuff, and MessageThreaderProxyModel [4] in Akonadi 
for implementing a threading model. It would be good to reuse and share as 
much as possible.

> 	Such a custom widget could be useful also for other applications. Korn for
> 	example. It could eventually end up in kdeui.
>
> - Implement tooltip based message preview in the view.
>
> 	Such a tooltip is faked in http://labs.pragmaware.net/misc/kmailsnap5.png
>
> - Port the message view to native Qt4
>
> 	Actually the message view is implemented by using the Qt3 support
> 	classes. I will port it to use only native Qt4 classes and maybe
> 	adapt it to use the standard model-view architecture (to be discussed
> 	in detail).
>
> - Implement the relevant configuration items/pages for all of the above.
>
> - Remove Qt3 support from kmail sources and other relevant places
>
> 	I see that there are still several instances of Q3*/K3* classes
> 	floating around. I'd like to help in replacing them with native Qt4 code.
> 	Result at the end of GSoC: kmail (and maybe other apps) no longer
> requiring Qt3 support. I already have a certain experience in porting huge
> apps from one major version of Qt to another :)
Well, help with porting is always appreciated, let's see if there really is 
time left for that. I really want that header view stuff to be properly 
integrated first, which might not be an easy task.

> Other related hints are obviously welcome.
Nothing I can think of now, but I'm sure there will be lots when/if the 
proposal gets accepted.

Regards,
Thomas

[1] http://doc.trolltech.com/main-snapshot/qstyleditemdelegate.html
[2] 
http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKCategorizedView.html
[3] 
http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKCategorizedSortFilterProxyModel.html
[4] 
http://websvn.kde.org/trunk/KDE/kdepimlibs/akonadi/kmime/messagethreaderproxymodel.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080330/a8b28237/attachment.sig>
-------------- next part --------------
_______________________________________________
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