Part of my diploma thesis agreement with Red Hat was to blog about my work for the KDE Telepathy team. I'm currently taking care of the contact list (CL) component. There was a discussion about what the CL should be able to do and what not. For the first KDE Telepathy release we decided to implement it as a moreless full featured app, like kopete. After that it may be taken down to parts and reintegrated elsehow in the desktop environment (though the CL will still exist and will be used, just some features may be moved elsewhere). But let's not discuss this just yet, it's way to early for that. Instead, let's see, how is the CL coming.

So far, the basics are almost all in place. We have a working contacts model, working presence setting and you can also start a text chat. And that's pretty much it now :) But don't worry, there's a loooong todo list of features waiting ;) Let's look closer on some of the things.

Contacts model

I started to implement my own model at first, based on telepathy-call-ui (the KDE part for making voice calls). This was really just a basic tree model with only few features. Though working, it still needed fair amount of work. Then David Edmundson showed me Telepathy-Qt4-Yell project, which has pretty solid and full-featured model already done. So I dumped the old model and adapted a new one, based on this project model. Thanks to the great architecture of Tp-Qt4-Yell (and the CL too :P), it took only a few hours to get this up and running. So this is now under the hood. There's still need for filtering/sorting proxy model, groupping model, hiding-offline-contacts model (some work has already begun on this) and a few other things. Bottom line is that we have a fully working contacts roster (with avatars and everything), but unsorted (by status nor by name).

Contacts view

The view is based on QTreeView and though it works like a tree (you can expand/collapse groups), it doesn't and won't look like a tree (in filemanager for example). When there is a support for metacontacts, which will group several contacts under one, the sub-contacts will then be padded, but no guiding lines will be painted. I just don't like the kopete-filemanager-look. It feels cluttered and over-lined. So the aim is to keep it visually simple, nice and appealing (UI artists wanted!).

One feature I particulary like about the view are the delegate overlay buttons. I borrowed the idea from digiKam, where it was implemented by Marcel Wiesweg and based my code on that. It's basically about showing buttons (KGuiItem) on mouse-hover and hiding them on mouse-away. These buttons are used particulary for starting text/audio/video channel or sending a file. They should be a context menu replacement in a way (don't worry, context menu will still be there with all you'd expect ;) It also hides those buttons (capabilities), that the contact doesn't support. It nicely fades in and paints itself under the user name (see screenshot around). Another cool thing is, that if there is a status message present (below the username), it is faded out first, so these two UI items wouldn't overlap. On mouse-away the status message of course fades back in and the overlay fades out.

Another thing done in the view are system messages. For example when there's a error or you're disconnected etc. There are two types of messages - info and error. Info messages will fade out automatically after few secs and they are blue-ish (probably will apply theme's color later). The error ones will stay until you close them (making sure you read what's wrong) and these have light-red color. Both slides up from the CL bottom edge, see the screenshot. Although indicating the "Connecting..." and "Connected" will be done differently in the end.







At the CL bottom, there are buttons, which I call AccountButtons, and these take care of setting the presence of particular accounts. You can see it on the first screenshot. How many accounts you have, that many buttons will be there. I'm also working on a simple way to shield user from so many buttons and introduce a way to set all your accounts online at once. But I haven't given much thought to this yet.

TODO

There's a plenty of things left to do. For example the part of finding/adding new contacts, dialog for editing your own account information, way of joining rooms...and of course the filtering/sorting/offline-hiding proxy model with search capabilities. Later also integration with nepomuk is planned, but that's rather distant future now. Simply put - plenty of work left to do :)

Where to get it?

Currently I have a problem with my git account and my personal clone repo, so the code is not available at the moment, but I'll post a blogpost right when it's ready again, please be patient ;)

By the way, is there some simple Qt/KDE method for painting shadows beneath pixmap? If you know of any, please let me know in the comments. Also sorry for the need to log in to post comments, this is a TypePad restriction for free blog version (and I don't have enough money to pay 9$/month :P ), so please just use OpenID or Google account or something like that to log in. I like TypePad very much, it has nice features and such, but this and no per-tag-rss are really missing..