My GSoC Project: Port Plasma Calendar and other widgets to QML

This year I’ve been accepted as a Google Summer of Code student. My project goal is to port some plasma widgets (luna, fifteen puzzle, timer, calculator and notes) and the calendar to QML.

This GSoC project is rather important for several reasons, including:

  • QML will play an important role in Qt5
  • Using QML will allow to switch easily to QML Scene Graph
  • QML makes development and maintenance easier
  • QML plasma widgets much less likely crash the plasma shell

I would like to underline that a plasma widget is ported when there are no regressions so no one will notice the difference (anyway I hope they will behave better).

Timer widgets comparison (left: C++ version, right: QML version)

Timer widgets comparison (left: C++ version, right: QML version). Do you see any difference?

Current Status:

I’ve been working on this GSoC project for nearly a month now and the port of some widgets is almost complete (there are some missing pieces that needs to be addressed but I think they will be ready soon).

I'm going to Akademy 2012

Anyway at the Akademy I will talk more about this GSoC project (Sat. 30 at 10.15/Room 2) πŸ™‚

Plasma and QGesture*

Plasma has support for mulitouch events but for some reasons I can’t get any QGestureEvent, does anyone have any idea about why QGesture doesn’t work with Plasma?

It seems that QGestureRecognizers can receive QEvent::TouchBegin but they can’t receive QEvent::TouchUpdate or QEvent::TouchEnd.

Any idea?

Plasma Web Browser and WebKit

Recently I’ve been working on the web browser plasmoid and since yesterday it’s possible to use it like a complete stand alone browser (with advanced rendering capabilities thanks to QtWebKit), moreover Plasma::WebView has been recently ported to KGraphicsWebView so it has KDE integration too.

The summary of recent changes is:

  • Plasma::WebView does the same (and better) with less lines of code.
  • Plasma::WebView uses now a KDE integrated WebKit.
  • Web Browser now supports windows (with overlays).
  • The progress bar has been replaced with a ProgressComboBox (like rekonq).

By the end of the tokamak plasma will provided to users a complete web experience.

Moving things to the right place

Yesterday I’ve moved desktop theme configuration from Desktop Settings to System Settings style module. Now Desktop Settings dialog looks less cluttered.

New system settings/style desktop theme configuration tab

New system settings/style desktop theme configuration tab

Now I’m still working on Desktop Settings dialog and I will continue to improve it.

Next step is to add categories to wallpaper settings.

10 rules for a plasma widgets developer

  1. Don’t call updateGeometry() during a size constraintsEvent and don’t call resize.
    If you want to keep the same aspect ratio you may be interested in Applet::setAspectRatioMode( ).
  2. If you want to write a new clock widget, you should inherit from libplasmaclock ClockApplet.
  3. Don’t do custom things: use default plasma methods and widgets when possible.
    Some useful methods are: Applet::setBusy( ) if your applet is busy, Applet::setConfigurationRequired( ) if user needs to configure the widget, etc…
    Some useful widgets are: Plasma::CheckBox, Plasma::ComboBox, Plasma::LineEdit, Plasma::PushButton, Plasma::RadioButton, etc…
  4. Don’t reimplement Applet::showConfigurationInterface, reimplement Applet::createConfigurationInterface instead.

    void MyApplet:createConfigurationInterface(KConfigDialog *parent)
    {
    QWidget *widget = new QWidget();
    ui.setupUi(widget); //ui is your configuration interface
    parent->addPage(widget, i18n("General"), icon());
    connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted()));
    connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted()));
    }
  5. Use Plasma::Animator and fast animations (not slower than 150 milliseconds).
  6. Use a standard background when possible.
  7. Avoid installing custom svg graphics when possible.
  8. Load graphics using Plasma::Svg.
  9. Don’t forget that the theme may change while your widget is running.
  10. paintInterface() might be called before init().

New calendar widget moved to kdereview

Plasma::Calendar Widget

Calendar Plasmoid

Finally today I moved the new calendar widget to kdereview.
This new widget is based on a nuno‘s mockup and it will be usable by any plasma application that needs a calendar (it will be part of libplasma).
One of my aims is to write something that is highly customizable so it will be possible to do cool things like integration with akonadi.
I’m planning to continue to work on it and to add some new features like ToolTip support so if you have any ideas, please email me πŸ˜‰

new kickoff mockup

Friday night I was playing with inkscape and I tried to do a kickoff mockup because I don’t like kickoff’s current look (kickoff is a white and flat rectangle that doesn’t fit really well in a black plasma theme). So, I worked all night and at 05:30 AM I finished this mockup:


(don’t forget that I’m not an artist πŸ˜‰ )

My idea essentially is to use user’s current plasma theme, so If the user uses the default theme he will have a black kickoff otherwise if the user uses fluffy bunny theme, user will have a fluffy bunny themed kickoff. πŸ˜€

Today I started to work on it: I created a new branch called ckickoff, I removed some lines of code and I switched from Plasma::Applet to Plasma::PopupApplet.
PopupApplet allows (with a few lines of code) for showing an icon when the plasmoid is on the panel, and showing the whole plasmoid when it’s on the desktop, so now if you place kickoff plasmoid on the desktop you see kickoff launcher and not a K icon.

For now I have nothing more to say except that I’m going to Akademy:
I\'m going to Akademy 2008