A QML activity chart component

I really don’t know how to call it, so I came up with “activity chart”. It’s just a graph to show the network usage in my system info plasmoid.

I didn’t really know how to do that in QML until I came up with the idea of having a model with the latest values, and just removing the first item and adding the new value at the end. Then, a delegate takes care of translating that value to a graph bar, and so on.

system3-activitychart

Anyway, I think the result is pretty neat, and I’m almost done with my system info plasmoid. I only need to figure out how to query the weather plasmoid to get the weather for my town, in QML.

About asoliverez

Free Software developer, KDE e.V. member, political activist at SoftwareLibreConCFK, Zen Buddhist, son of a retired physicist and politician ,and a Literature professor; husband of a beautiful QA consultant, and father of the cutest daughter

5 thoughts on “A QML activity chart component

  1. Sven
    23/02/2013 at 13:06

    Neat! But, -278dBm WLAN signal level? Are you sure that’s correct? ;)

  2. 23/02/2013 at 16:33

    Hey, it’s what the dataengine is returning. I don’t know enough about wifi signal to tell whether it’s correct. The notebook is less than 1 meter away from the router, so that might be it.

  3. Mikko777
    24/02/2013 at 14:49

    Awesome work =)

    Would be nice to have a conky style textfile configuration opened from the sysinfo plasmoid settings if at all possible. (colors, fonts, and what stats and graphs to display and in which order).

    Also could you incorporate your clock plasmoid to the sysinfo one?

    TY and keep up the good work =)

  4. markg85
    26/02/2013 at 05:07

    Hi,

    That looks neat! But i do wonder, how did you make it? It’s for KDE so i’m “assuming” it’s for the 4.x series which is Qt 4.8.x. That series doesn’t have any canvas capabilities (that entered Qt 5.0) so.. how are you doing this?

    My guess is that you are using a QML component which you paint using QPainter from the C++ side, right?

    If that’s the case then you might consider giving this a shot using Qt + canvas. It’s neat! But won’t work till KDE 5 is here.

    Cheers,
    Mark

    1. 26/02/2013 at 13:09

      It’s far more simple than that. It’s a QML component, with a delegate that draws a Rectangle that varies in height depending on the value of the activity.
      You can see the full code here: http://quickgit.kde.org/?p=scratch%2Fasoliverez%2Fheikusystem.git&a=blob&h=23df51f1b7bcefe87dc8ebc85d5fe484d4690765&hb=957685309e0cc0548232ba28f43179029c9a90a5&f=contents%2Fqml%2FActivityChart.qml