Archive Page 2

Get your cover!

Just a quicknote about the last feature i’ve worked on today: a CoverFetcher DataEngine πŸ™‚

Simply query your cover doing coverFetcherEngine->query(“ArtistName|AlbumName”); and a source will be added to represent the cover. Each cover will be represented by a source of the dataengine. Additionally, for each source, you can find more than one cover categorized with the keys: “small”, “medium”, “large”, “extralarge” according to the different cover size fetched.

The playlist applet already takes advantage of this.. get your cover!


P.S.: the magic behind the engine is the api. I hopeΒ  to be respecting their license.. I’ll add a Credit file mentioning them as soon as possible to the repository.

2nd P.S.: thanks to lfranchi for pointing me to

3rd P.S.: thanks to notmart and pinotree for the hints about the xml parsing

Cheers devs! πŸ™‚


Adventures in MediaCenter land

Heyo people!

Things are taking shape just nicely here in MediaCenter land =)

First of all: things have movedβ„’: this means that if you have checked out playground before 26th of April you should `make uninstall` and checkout it back from the MediaCenterComponents folder i’ve created under playground/base/plasma. This is just because the MediaCenterComponents won’t be a single application but a mix of all our powerful Plasma capabilities: engines, applets, new dashboard and so on.. in addition to a complete DBus interface.

DBus stuff:

As mentioned in my previous post MediaCenterComponents is intended to have a full featured DBus interface in order to allow intercommunication among media applications. That’s why i focused on extending the PlaylistEngine interface with more methods than the last time i talked about it. Now we have methods like:

  • void addToPlaylist(const QString &playlistName, QStringList files);
  • void addToPlaylist(const QString &playlistName, const QString &file);
  • QStringList availablePlaylists();
  • QStringList filesInPlaylist(const QString &playlistName);
  • void removeFromPlaylist(const QString &playlistName, QStringList files);
  • void removeFromPlaylist(const QString &playlistName, const QString &file);
  • void removePlaylist(const QString &playlistName);
  • void setCurrentPlaylist(const QString &playlistName);

While most of them do simply what their name says, some need a more deep explanation. The method availablePlaylists() simply does what Plasma::DataEngine::sources() do (remember that each playlist is a source) but skips the currentPlaylist source. That’s because currentPlaylist is just an helper but i’ll talk about this some lines next. The method removePlaylist, instead, removes a source from the engine. And finally, setCurrentPlaylist simply informs the world about the current playlist to play. You don’t want to play many playlists at the same time, right? πŸ™‚

The MPRIS specification

My near plans are to make everything compliant with the MPRIS specification so i have to keep this in mind while implementing the whole DBus interface. The first little problem i had to challenge with was the fact that MPRIS assumes only a playlist: the current tracklist. So i had to meet this limitation just using the method setCurrentPlaylist. This will help me acting as a wrapper around the playlist chosen by the user. The org.freedesktop.PlasmaMediaCenter /TrackList will just see the currentPlaylist and i won’t just get crazy with it.. Just as easy i think πŸ˜›

And that’s why i decided to skip the currentPlaylist source in the availablePlaylists() method still leaving it in the sources though. After all it’s still a source, a plain copy of the chosen playlist. The different thing is that, unlike the other sources, this one won’t get saved in the config. At least it’ll be saved as lastUsedPlaylist but i haven’t implemented it yet.


Even if we have a DBus interface Marco suggested me that using DBus over the same common ground is a bit overkill. So he pointed me to Plasma::Service. And that’s what i did, for now simply making the setCurrent method available via the Playlist Plasma::Service. setCurrent is available for each source and simply does setCurrentPlaylist(source). As you may imagine calling setCurrentPlaylist(currentPlaylist) simply does nothing.

I must say that implementing a Plasma::Service was not that difficult but unfortunately it has no docs and i had to look at nowplaying code. The KConfig stuff initially caught me unprepared but i managed to do it :P. I plan to write docs about it soon since it is a really powerful technology for Plasmaβ„’ πŸ™‚


And now that the invisible stuff is almost done it’s the time for the applet stuff. I managed to write a simple and really ugly applet just to test how the interaction with the engine goes and it seems to already be fine. I made use of TagLib to retrieve tracks info so TagLib is a required dependency for PlasmaMediaCenter. Not that bad since we have it in kdesupport :P.

Take the screenshot!


Please, suggest me a nice icon for this ugly applet (/me stares at Nuno xD). Of course i plan to make it nice appealing keeping in mind that the MediaCenter would be accessed through remote control (thanks Marco for pointing this out πŸ™‚

Unfortunately now nothing plays so you have to wait a little more πŸ˜›

Aaanyway that’s it for today

Stay tuned and see you! πŸ™‚

Smells like Summer of Code…

Heyo people,

Long time you don’t hear from me.. =)

So, this is really a funny month for me it seems. As already announced in my previous post i started a C++/KDE course at my university (as professor =) and i’m having fun with it. There are students really really interesting in understanding how KDE development works. I hope to be fitting well the purposes of the course.

Aaaanyway i’m really really happy to join GSoC this year. It’s the first year i attend it and i’m very excited about it!

In addition to this today Sebastian sent me an email stating that fundings for the nepomuk sprint have been accepted and i’ll finally meet some of you in real life at this amazing meeting!! =) Looking forward to meeting the nice persons you are!

As you may have noticed from the title this post is about my GSoC proposal. You can read about it here.
A very big thanks goes to Marco which is taking/has taken care of my proposal and of me as a brother =)

I really hope to be able to use this huge project as my thesis this year, but, who knows… πŸ™‚

Anyway,Β  now some code-speaking for your code-hunger: just to let things start softly i put my hands over the Plasma::DataEngines programming and, in the last 2 days, i managed to hack on a PlaylistEngine which is capable of storing your playlists and managing them. So simple and so useful for my GSoC intents since i’m gonna implement the Playlist Applet ASAP. The engine is shipped together with a DBus interface and you can already try it using qdbus/qdbusviewer to interact with it and start building your playlistS. The plural form is because it may handle more than only one playlist. Each source of the engine is a playlist and you can populate them at your will. The relevant DBus method are:

  • void addToPlaylist(const QString &playlistName, QStringList files);
  • void addToPlaylist(const QString &playlistName, const QString &file);
  • QStringList availablePlaylists();
  • QStringList filesInPlaylist(const QString &playlistName);

addToPlaylist simply adds a list of files to the playlist named playlistName. Of course, if the playlist does not exist it will be created. The second method is, of course, a convenience function. The third method simply returns the list of populated playlists. And finally the last one returns the files under the playlist playlistName. As you may notice no removal methods are still present. But i’ll add them asap.

This is how the engine gets displayed by our friendly plasmaengineexplorer. Even if the Key field is always “media file”, i think i’ll use it to specify whether the file is audio/video/picture and whatever has media content. In fact the playlist is intended to be used as Media Center component, so any media component would be accepted πŸ˜›


What i find really nice of it is that it already can automatically update the playlist when the files listed in get deleted from the harddisk. πŸ™‚ Of course the playlists already get saved on your hd using KConfig, so playlistenginerc is what you want to manually edit your playlists.

The code currently stays under playground/base/plasma/dataengines/playlist so, if you have time give it a try! πŸ™‚

That’s it for today.. I’ll keep you up-to-date about the development.

Lemme know your opinions, suggestions.. πŸ™‚

Cheers devs!!

Teaching KDE

DISCLAIMER: We know KDE is wider concept than simply application development but in this post i’m gonna talk about development related issues πŸ™‚

INTRODUCTION: I suppose we all might agree with the fact that the most solid pillar of the Open Source World is the idea that every little piece of code might be an helpful reading for other developers in increasing their knowledge. This means that sharing knowledge is our strength. I really don’t want to argue against other form of softwares, i’m just underlining the strength of our personal form of software beliefΒ  (second disclaimer :P). As many of you may already know i’m a student of Computer Science Engineering at the Politecnico of Bari here in Italy. I’m not very happy of how *they* teach most of the subjects we study in the courses and most of my sadness is due to the way they teach (or try to teach) us programming languages. Nearly two years ago i passed my C++ exam but all we learnt was how to create simple command line-apps that we might have easily written in C. I’ve always dreamt about a C++ exam where the teacher picks a piece of KDE code as example and uses it to teach us all the funny things of developing an application, advanced C++ tricks and so on. I know i still have the “Software Development Engineering” exam at the 2nd specialistic degree (don’t really know how to say that in english) but i’m sure *they* won’t teach us developing applications starting from a real successful example from the Open Source World.

THE IDEA: So, an idea came to my mind. I proposed to some friends the idea of building up a C++/Qt-KDE course open to every one interested in it. We have students associations that help us fight for our rights and realize self-managed courses like the one i proposed. The idea was accepted and really lots of student signed up!! This makes me really proud and happy since i have the chance to teach something i learnt (and continue learning) developing in KDE.

THE COURSE: The course will be of 10 lessons, 2 hours each. Students are supposed to have C++ basis since i’d like to deep start with the real development. Most of our courses at the university are just about theory (this is one of the big problems of italian universities: too much theory, really poor practice); so i’d like to help them make practice. I talked to two of them and their expectations about the course are just these: design and develop an application, practically!! Put their hands on the code, fight against build errors, optimize code and so on.. The stuff we do almost every day with KDE xD. So i’d like to use the 10 lessons to design and develop a real simple KDE application discussing the designing problem with them lesson by lesson. This way, after the course, they will be able to continue taking care of their little baby maybe making it grow as much as having the opportunity to publish it on maybe πŸ˜€

YOUR HELP: And now let’s come to the real goal of this post :D. I haven’t yet decided what application they’re gonna develop with my help. It just came to my mind the idea of a simple Text Editing Application but maybe you have nicer ideas. Of course keep in mind that most of them don’t even have ever touched Qt/kdelibs/cmake. I’d start from the techbase tutorials to help them write a basic KDE application and then start with the real development. In addition to this i was looking for a live distro that ships at least KDE 4.2 with cmake kdelibs-dev and kwrite to help those students without Linux on their PCs (i think i’ll force all of them installing it πŸ™‚

So please, lemme know your ideas, suggestions, insults and whatever.. everything but spam is appreciated xD


Just one more idea (add widget stuff)


Ok first of all i’m really sorry for my poor mockup skills, i did my best but i’m just crappy at drawing with pc πŸ™‚

And now the explanation..

This is my crazy idea for the “add widget”-stuff. Don’t really know if it is user friendly, nice and whatever, it just came to my mind before going to bed so i decided to put it down and show to you, folks :).

So, how is it supposed to work? Let’s go step by step:

  1. The user keeps a modifier pressed (e.g. ctrl+alt+whatever)
  2. The plus icon appears on the desktop at the cursor position
  3. The user clicks the plus icon
  4. That mockup stuff appears
  5. Categories are shown, the user navigates using keyboards to scroll items. NOTE: The number of visible items != the number of available items. Aka scrolling items through the right makes the last item on the right disappear and a new item on the left appear. Instead of categories this stuff can show favorites plasmoids as default or whatever you think it’s better πŸ˜‰
  6. The user finds the plasmoid he was looking for (either navigating the categories or typing the plasmoid name)
  7. The user just clicks the plasmoid icon and it’ll be added exactly at the plus-icon position.

That’s it i think. Feel free to ignore this post or ask question or even insult me xD

P.S.: s/plasmoid/the name you like most for your plasma widgets/

Cheers dear devs!

“the earth will shake”


Some hobbies are “easier” than others..

It’s been quite a long time since my last blog entry.. University, family and love took me a little away from the KDE scene.. Anyway i was able to follow the great success the incoming KDE 4.2 release is getting. You all have done a great job and we all should be proud of what KDE is and will be for the Open Source world. Unfortunately i’m in my exam period at university and i hope it’ll last soon.. Btw i was able to get back in touch with Plasma and committed two little patches this morning.. Nothing really relevant, just to feel i’m back to KDE development :).

Due to this busy period i’ve left Lukas all alone with our KConfigEditor port to KDE4 which is still there, just ported but not improved. I’ll get back working on it soon, i promise! πŸ˜›

PolicyKit-KDE is another big project i was contributing to till the end of the last year. Daniel Nicoletti, helped by Lukas, is doing a really great work and KDE will soon be enriched by a great PolicyKit library ;). I hope me and Dario Freddi will be back helping soon.

But the reason i wanted to write this (maybe unuseful?) blog entry was the interest Raptor is getting these days. Do you remember Raptor?? πŸ˜› Me, Riccardo, Lukas, Dario and some others (sorry, i don’t remember your names) started to work back on the abandoned Raptor promising we would have released it by KDE 4.2.. As you may have noticed we didn’t.. Sorry for that..

Someone asked in chat, some others in the mailing list.. I’d like to show you what a dear user said on =)

It is quite a sad ordeal that such a brilliantly planned and designed project has been halted. I hope someone can get to work on it. Now that KDE4 has matured though, I realise there may not have as many visionary developers willing to work on it. In saying this, it is still a worthy cause if anyone wants to give it a go. This would be a very powerful system, capable of running on any operating system and may change the paradigm of such systems in the future.

Please, if anyone is reading this. If you are interesting in it and have spare time, please work on it :).
– Sacha

It is always a big pleasure for us (you, me, us), developers, when users directly ask for our contribution and talk about their real feeling of need for this or that feature. As Sacha says, KDE4 has matured; yes, but i think that just because of the current state of KDE4 there’s now need to make real what Raptor (the idea) is! Unfortunately, for most of us, KDE is a question of spare time so sometimes we need to abandon it a little in favour of university, work, or whatever. So, Sacha, and everyone else interested in, sorry for the slowness of Raptor development, but i’d thank you for your mail. It makes us really proud of being KDE developers and it is for sure a motivation for us. IΒ  hope we’ll be able to make Raptor real soon. You can track its development with this repository: or just ask on #raptor. =)

P.S.: I have some news about Raptor, technical stuff.. Youll read soon a blog entry about it. πŸ˜‰

Hugs KDE devs & users.