You are using an obsolete web browser, or you have the page styles (CSS) disabled. You'll be able to access this site, but only a visually simplified version.

Shelf applet in QML [Lancelot]

I have realized I haven’t had a Lancelot-tagged post in a really long time. This just has to change.

After the release of Plasma Active 2, I decided to take a few days off, and do something else. After Martin’s port of Kickoff to QML, I got the idea that I could finally start porting Lancelot to QML. I have entertained this idea in the past, but I was unsure about how backwards compatible QML2 will be and whether I’ll have to rewrite large parts of Lancelot for the fifth time due to changes in Qt.

With all those doubts still present, I decided to bite the bullet.

I’ll try to keep things on the /safe side/ by keeping the Lancelot-specific hacks to a minimum. This means I’ll try to use Plasma Components and standard Qt Quick as much as possible instead of writing my own like before (at the time, there were no pre-made UI components for QGraphicsView).

Data models

The first to port were the data models – instead of a custom ActionListModel class, I’m now using the standard QAbstractListModel, and all the models are exported as QML components in the namespace of org.kde.lancelot.components.data.

This means that any KDE/QML application, plasma applet or something else, will be able to use these models by doing a simple import.

Shelf

After the models were converted, it was the time to test them, and what better way than to re-implement the Shelf applet. As you can see in the screenshot, even the KRunner-based search works.

Regressions

There will be regressions in this process. Some intentional (aka permanent feature removals), some not. At first, there will be no click-free activation, no drag-and-drop, no …

I don’t plan on releasing Lancelot 2 until most of the current features are reimplemented, but this is not the case for the Shelf. It will go into KDE Plasma 4.9 regardless of state it will be in. It is almost usable now, more than a half a year before 4.9 is released to the wild.

Lancelot 1.x

There will be no major changes in the current branch of Lancelot, unless someone steps up to do the work. I’ll try to find the time to fix openSuse-specific (I don’t use oS, so can’t reproduce) crashes that have been flooding bugs.kde.org recently, but that might be after 4.8 is released.

14 Comments »

  1. Nice to hear. Lancelot was my favourite launcher when I still used them.

    Will lancelot still run as its own process after the port?

    Comment by hoi — 21 December 2011 @ 00:36 Reply to this comment

  2. @hoi: Yes, I still think that the benefits of that outweigh the drawbacks.

    Though, it might be possible to have both.

    Comment by Ivan Čukić — 21 December 2011 @ 09:50 Reply to this comment

  3. Hi!

    Please don’t forget to adjust the colors. black/grey on grey is really difficult to read!

    Comment by summmo — 21 December 2011 @ 14:00 Reply to this comment

  4. @summmo: Yes, it will be dependent on the Plasma theme. So, it will behave just like any other plasmoid regarding colours.

    Comment by Ivan Čukić — 21 December 2011 @ 14:09 Reply to this comment

  5. Lancelot is my favourite launcher, I use it everyday on kubuntu 11.10. Thank you for your time and effort. :)

    Comment by Jussi — 21 December 2011 @ 15:17 Reply to this comment

  6. @Jussi: Glad to hear it :)

    Comment by Ivan Čukić — 21 December 2011 @ 16:56 Reply to this comment

  7. Qt + Linux = Beauty + Power. Gonna try the KDE interface soon. Now staying on GNOME.

    Comment by RajaRaviVarma — 21 December 2011 @ 20:15 Reply to this comment

  8. Fantastično! Hvala puno! Lancelot je must-have na svim mojim sveže instaliranim sistemima.

    Comment by Bogdan — 21 December 2011 @ 21:25 Reply to this comment

  9. @RajaRaviVarma: Yup. Honestly, can’t wait to see KDE Plasma and the rest in a year or so :)

    Some quite nice stuff in works…

    @Bogdan: Ah, trudimo se. Samo kad bih imao više vremena za rad na Lancelotu :)

    Comment by Ivan Čukić — 21 December 2011 @ 22:47 Reply to this comment

  10. I never liked lancelot (complicated) but shelf is my all time favorite. It’s simple and very usefull. I’m happy to see new, better integrated into plasma version coming this year.

    Thank you for this awesome work!

    Comment by herrbatka — 17 January 2012 @ 17:25 Reply to this comment

  11. @herrbatka: One cool thing about all this is that when QML port of Shelf and L is finished (aka Lancelot 2.0) you’ll be able to have different presets for Lancelot to have it less (or more) complicated.

    Comment by Ivan Čukić — 17 January 2012 @ 18:05 Reply to this comment

  12. @Ivan Čukić
    Now this sounds great!

    BTW, I’m wonder If is it possible to make a shelf for appmenu so It would be possible to add it to the panel and use use just like global menu applet (this one that uses menu over dbus hack), but also with search field so It can be used like new ubuntu HUD as well.

    I’m not a ubuntu (or gnome…) user but this is a fantastic idea and it’s actualy useful (unlike ribbon). Just look:
    http://www.youtube.com/watch?v=w_WW-DHqR3c

    Pardon If I posted anything out of lancelot/shelf scope, just any random idea.

    Comment by herrbatka — 28 January 2012 @ 14:55 Reply to this comment

  13. @herrbatka: Never apologize for good ideas :)

    It is not out of the Shelf’s scope (IMO, it would be better in Shelf than in HUD because you could also browse the menus and not only search them) but I’m afraid it is out of my scope for the foreseeable future.

    I have quite a few things on my plate, so if something like this is going to be done, somebody will have to step in :)

    Comment by Ivan Čukić — 28 January 2012 @ 16:21 Reply to this comment

  14. @Ivan Čukić:

    Yes, browsing + searching was the idea. Sadly I can’t help since I’m not a coder at all (QML looks like a nice hobby so who knows, It would be cool to create simple plasmoids on your own).

    Anyway thank you very much for the answer.

    Comment by herrbatka — 28 January 2012 @ 17:55 Reply to this comment

RSS feed for comments on this post. TrackBack URL

Leave a comment