Graduated :)

Just a quick update to say “Hello Again” to everyone; I’ve just graduated in Control Systems so finally I’ve got enough free time to contribute back to KDE, so see you around :D

For those who are interested a little bit on the subject of my thesis, it’s all about a bunch of graphs and lots of considerations regarding the implementation (and co-simulation) of the so called “Three-Loop Algorithm” for controlling the trajectory of a missile in two dimensions.

Oh, and loooooooooooooots of kudos to Kile’s developers, it’s been a pleasure to see how it improved after the last time I had the chance to use it :)

If you want to read more, you can download My Thesis … There’s also an Easter Egg, if you can spot it ;)

(Btw there are a couple of errors I’ve spotted after giving it at the registrar’s office, anyway they’re not that relevant)

Merry Christmas, and a PlasMate surprise for you :) [screencast]

Hello planet,
It’s been a looong time since my last post here. As I wasn’t selected for attending the GSoC this year, I focused myself mostly on passing my last few exams, and finding a teacher for the thesis I’m currently doing.
But, as PlasMate mantainer (along with sebas), I always felt completely unstatisfied about the current codebase and I couldn’t stop thinking about the improvements I had to do1.

Thanks to Giorgios,  who took the responsibilty for keeping the bug count low and implemented a lot of cool features too, I was able to use my little spare time to think about how improve PlasMate codebase.

I started with implementing a small core library which basically:

  • loads a series of language definitions (no more hardcoded values for each language);
  • performs a scan of the plasmate projects dir;
  • loads the projects and reads their specific project settings.

Then, I started implementing a simple plugin structure to make PlasMate more flexible without the risk of  letting the code grow with no  control. The current supported plugins are:

  • DockWidget (surprise! :P ) – widgets that can be placed in a QDockWidget, but also in an overlay or in a special “pinnable widget” (yet to be implemented). The File Browser, TimeLine and Previewer in the video all belongs to this type (coming soon: a console to collect the applet output);
  • EditorCreator (blah, i have to rename it to EditorFactory): creates and Editor for the given file, based on its type; for now we have a kate editor and the metadata editor available (coming soon: QtDesigner editor);
  • WebServices – allows PlasMate to interact with online services such as OCS, OwnCloud and others (none done yet, I’m porting the OCS one however).

At this point I’ve also implemented a configuration manager to write plasmate-wide settings,project-specific settings and also plugin-specific settings, so there is just one centralized place which takes care of this kind of stuff :)

The library bits and the UI are working quite ok, I can load the old projects and save the project-specific settings, open the source files/edit/preview the changes, but there is still a lot of work to do. The code is hiiiiighly unstable and lives only on my hard drive for now: as soon as I get something more stable, I’ll publish it :)

In the meantime, enjoy this video teaser :P

Or, you can download the video in HQ and watch it later.

And Merry Christmas to all of you!

_______________________________________________________________

1: To Igor and the other people I told I was busy with a secret project.. yeah, it’s this one :) When I started developing the kmix applet replacement, I started having the concrete feeling that PlasMate was too much difficult to adapt to my workflow (i.e. no tabs to switch from a source to an other, the problems with the previewer size..) so I finally decided to start its modularization immediately :)

[Screencast] KMix QML Applet, the real one

When I started writing my last blog post, exactly two weeks ago, I never imagined that I would receive so many positive feedbacks and responses1 for a project that, as I’ve always restated, was just an proof of concept and nothing more.

Anyways that experiment (and the act of sharing it with the community) leaded, besides the comments, to an awesome consequence: the developer in charge to improve KMix DBus interface and provide the Plasma applet replacement, Igor Poboiko2, sent me an email the same day I wrote the aforementioned post.

Long story short: he was busy (like me) with College duties so, after refactoring the DBus interface, he was forced to stop his work. But the  amazing news was an other: he even wrote a Plasma DataEngine, and a Plasma Service for KMix :D

So we joined our forces,  I advised him to publish his work on reviewboard (he did a huge work, kudos!) to receive more feedbacks about his doings and I started coding, on my spare time, to a new KMix applet replacement. Since I had at my disposal this new “mixer” Plasma DataEngine, I started wondering why not making a QML applet, instead of a regular C++ plasmoid.

No sooner said than done, and this is the result (still incomplete) of my work:

[HQ Version]

The applet has all the basic functionalities required for a mixer, you can modify the volume level/state for each control (in my past experiment, I was only able to act on the Master) but still, there is a lot of room for improvements.

I was really impressed about the power of QML and Plasma technology combined (plus some Javascript flavors),  I think I’m in love with them :)

As soon as Igor’s work will be published, also mine will land on reviewboard and, hopefully, will be part of the kdemultimedia module :)

Stay tuned for updates, cheers!

_______________________________________________________________

1: I even scored the busiest day on my blog, and my previous record was half of the visit I received that day O.o
2: Unfortunately, he doesn’t have a blog; I’ve found his sourceforge and twitter page, if you are interested

KMix plasmified [Screencast]

Hello folks, it’s been a looong time since my last post. Three months ago, during the Christmas holydays, and inspired by Aurelien’s posts about how improve UI’s in KDE-Land, I got inspired and started submitting some small patches to plasma and ksysguard, and then I focused on an application I (and I think all of you) use a lot: the audio applet.

KMix has a fancy monochrome tray icon, which makes it appear homogeneous with the other plasmoids contained in the Notification area. From a non-developer point of view, this is great: the user doesn’t need to know the difference between a regular application and a plasmoid placed in the notification area; he/she simply has to use it. The problem raises exactly when we want to use it: instead of showing to the user a beatiful interface which takes advantage of the Plasma API, the audio applet shows the old and plain slider with a regular pushbutton, destroying the feeling of an homogeneous and polished panel. Moreover, if the notification area is embedded in a vertical panel, when you click the KMix tray icon, the widget partially covers the panel.

For these reasons, I started porting KMix as plasmoid. I encountered some troubles so I contacted the mantainer whom kindly told me that port was already started by an other developer. So I leaved that project, and focused on something else. Why this post then, you may ask?

About one month ago my exams session started and, as usual, I got inspired on some projects (daaaamn :P ) and specifically on KMix. I was curious to see how a possible port of KMix to Plasma would look like, so I’ve started this small experiment/proof of concept.

In the video below, you can see what I did, plus a cool feature made possible thanks to Plasma:  a minimalistic media panel :)

(Sorry for the bad quality of the video, but recordmydesktop is not working on natty, plus I’m having problems with fglrx so I’m using the opensource driver1)

[HQ Version]

Some screenshots for those that don’t want to download 53 MB of video:

KMix Applet - Collapsed in an icon

KMix Applet - Popup shown

KMix Applet - Controls shown inside panel

Pretty cool, isn’t it? ;)

However, there are a lot of issues with the current implementation, mostly because I’m using DBus calls to an interface exposed by KMix. Don’t get me wrong: it is awesome, because saved me  a lot of headaches like dealing with alsa/oss and whatever but, on the other hand, the interface exposed to DBus is outdated and far from complete. For example, you can retrieve only the ID of the master device and set/get/mute/unmute only that device, there is no signal exposed for notifying changes of the volume level, so you cannot be notified of the volume level if an other app is modifying it unless you repeatedly poll the result of the masterVolume() call2. Sometimes, when adding/removing multiple instances of the applet3, plasma crashes (this is my fault). Since I rely on DBus calls to get/set the volume, this means that you can’t quit the old KMix application; however, you can open KMix main window, click on “Configure KMix”, uncheck the “Dock in system tray” option, and then close the KMix window.  In this way KMix will run in the background, wihtout showing himself in the notification area, and you can enjoy the plasmoid version :)

If I didn’t scared you enough and you still want to give it a try (until the official version will be released) you can grab the code from my personal repo, and then compile and install it as usual.

Cheers!

_______________________________________________________________

1: By the way KWin’s “Magic Lamp” effect works way better with the opensource driver rather than the closed one, so much win :D
2: The mantainer told me that the developer in charge of porting KMix to plasma is also writing a better and efficient DBus interface, to allow a fine-grained control of the Mixer object, so the official release will really kick ass!
3: I know that it does not makes sense with the current implementation, since I can only modify the master channel, but I like to test all the possiblities :P

KDE project template(s) for QtCreator

Laziness is such a great virtue, sometimes :D

Yesterday I was sitting in front of my computer, ready to start an application from scratch, and I felt very bored when I thought about all the files I need to create every time in order to have a minimal and functional application to start with. You have to write a CMakeLists file (and every time I forget to set some vars, or make some stupid typo), a .desktop file, a main.cpp source file and a class.h/cpp files. Oh God, why QtCreator doesn’t ship with some simple and handy template for KDE projects?

So I sat down, learned how to build a custom template wizard, and here you go: I made three project wizard: one for KDE console app, one for GUI ones, and the last is a plasmoid wizard template :)

And, of course, now I’m gonna showing you some screenshots!

 

Overview of the Projects page

Overview of the options inside the KDE gui project page

Overview of the options inside the Plasma Applet project page

Final result

Of course these wizards are far from being complete, so any comment/suggestion/critics is highly appreciated :)

You can grab the templates by cloning my repository:

$git clone git://anongit.kde.org/scratch/casella/qtcreator_kde_wizards

and then simply copy the folders under $HOME/.config/Nokia/qtcreator/templates/wizards or /share/qtcreator/templates/wizards/ .

Cheers!