Tag Archives: linux

Contouring resources

Software

Unfortunately I haven’t blogged since a llloong time, my fault 😉

But this doesn’t mean the things in Plasma land aren’t moving, au contraire! Last months I have been busy as hell with the Contour project, and the results are starting to became evident.

A quite big amount of progress has been made on several fronts: the user interface, the infrastructure of the Plasma mobile shell and what is even down in the stack from it, like Nepomuk and the KDE mobile profile

Also on the system integration front things have changed a lot. Admittedly trying out the KDE mobile software on an actual device has always been a bit of a voodoo operation, but now there are two ready to go booting pendrive images, for MeeGo and OpenSuse, together of course always updated package repositories (further information on the Plasma Active wiki).

I now want to show, as often as possible short videos of the User Interface of Contour, a little teaser for each notable feature.

OGG version.

First thing first, the screen the user sees when the tablet is turned on: an usual workspace with a wallpaper… it has icons.. (and eventually widgets)

but, interaction-wide you see that has some improvements for small/medium touch screens: icons are not individual, but categorized in boxes (documents, music, contacts…).

Second, everything is always aligned to a grid, making the composition always “look good” and impossible for those boxes to overlap, but still possible to drag them around to give a personal organization that helps your spatial memory.

And the last important characteristic is behind the scenes: that’s not a view on some folder as the desktops used to be: but it’s all data coming from Nepomuk, meaning that can be any type of what in Nepomuk is a “Resource”, so not only a file but also more abstract data like a contact, an email or a geographical location.

Everything that you see there are resources that have been connected to the activity, so each one will show a different list of resources (this could also make possible in the future for instance to show those activity resources as default in a file open dialog for instance)

How those resources can be connected to activities.. material for the next video 😉

If you are interested to have a more in depth look at the Contour UX and you will be at the Desktop summit in Berlin, you can stop by at this talk :p

Desktop summit

Reactivate

BlaBla

During last week we spitted out some strange hints about something cool we are preparing. It was been obvious that it had something to do with Plasma and something to do with mobile technologies.

So, here we go with Plasma Active

Active

the active project starts from a simple vision: Create a desirable user experience encompassing a spectrum of devices.

What does it mean? The KDE tecnologies have quite a lot of potential, i think absolutely everywhere, but right nowwe are still mostly targeted on the desktop.

I think that with what we got as platform, is fairly easy, once the last building blocks are there to build both workspaces and applications that can adapt to the whole spectrum of devices computing is today.

An importnant thig comes already in the name: it’s Plasma Active and not Plasma Mobile: why?

What we are doing right now is exactly a mobile project: tablets to be precise, but stopping there would be a mistake.

The Active project is about taking a step further and build applications that have their user interface and implementation completely detached, is about forcing ourselves to not think about a small use case but always about the bigger picture.

Our goal is to be sure that if an application is “certified to be active” can run as well in a tablet, as in an handheld device, as in a set top box, as in a type of device we have completely no idea about, once an user interface module specific for its screen size and input method has been added.

Sounds crazy

But we have the technology, We have QtQuick and Plasma, that combined can provide a single package, that has diffent user interfaces for each supported platform, and the best available interface is chosen from the device. Hopefully the “just right” UI elements will be available, otherwise the best one from a list of preference will be chosen.

Current code

Most of the code for Active is developen in the Plasma mobile repository, with of course all the enhancements needed in the KDE libraries ending up immediately in the usual KDE repos, being immadiately available for the desktop as well.

We don’t only plan to work on the development of the software tough. It’s possible to test the current code from day one, pre packaged, updated continuously.

A bit of clarifications

After Sebas’ blog about it, there was a question on how the various things, Plasma-mobile, Plasma-tablet and the various mobile efforts in KDE relates to each other:

  • It’s not a different project compared to plasma-mobile and plasma-tablet
  • Plasma mobile and Plasma tablet are actually the same workspace, just a different UI loaded on top of it: that’s the direction we want in both the workspaces and the applications
  • It’s an effort to define a good user experience on the mobile, from the distribution all way up to the apps, of which the workspaces are a part of
  • Any application, any project is more than welcome to join, bigger the ecosystem is the better it is
  • It is now targeted to tablets, this doesn’t exclude phones, set top boxes and washing machines however, that’s the future ;).

Right now it’s available for OpenSuse, later.. who knows 😉

Let’s create the best possible tablet user experience first, then the world 🙂

Little big cleaning details

Software

Disclaimer: this entry won’t talk about a certain thing happened those days, and I won’t in future entries as well, until there is actually something to talk about.

There is a thing that came to my mind some days ago, when i finally decide to fix a little visual inconsistency that was bugging me since some time.

In the KDE Plasma Workspace 4.7, the clock and keyboard layout indicator will look like this (landed in git earlier this week):

perfect clock text

The style of the systemtray is now much more coherent, all thanks to a quite slight change of look in those two little elements, in the specific, text svg-themed themed like the systray icons (that is by the way usable by everybody since it has been placed in the public plasma api)

A thing that will come for 4.7, is a series of many small improvements of many little pain points, may be either a small missing feature, a fix of a little inconsistency, or, in any case something small, easy to contribute that everyone that is eyeingto start to do some patches can find as an easy entry point.

There are already some heroes that have joined and started to review all shipped plasmoids for some points of behavioural consistence. First step, now, thanks to them in 4.7 all plasmoids will have a working “apply” button in their settings dialog.

You can make the diffrence too 😀

Separed at birth

Software

Here are two screenshots of Microblog plasmoids. There are two nice novelties that can be noted here (due respectively to KDE Plasma Workpace 4.6 and 4.7) are the support of “reply to message id” in the twitter API, so in Identica conversations will appear correctly threaded (sadly there is still no way to retrieve that threading information from the API) and the support for marking messages as favorites, that will appear in 4.7

Microblog plasmoid

On the right is the usual good old stock Microblog plasmoid, on the left it’s the plasmoid rewritten in QML+JavaScript. It is on early development but is probably going to replace the fomer (there are still some layout differences and details, all of this is going to get polished).

What’s nice is that in two days of development that plasmoid reached about 90% of the features the C++ counterpart gained in well, ages 😉 so I’m quite confident the development speed in Plasma will get a dramatic boost.

All of that code in in KDE svn playground repository, I will give more info when all will move to git together with the rest of KDE software.

One plasmoid 3 platforms

Software

I already extensively talked on this blog about the new QML declarative AppletScript that will be present in the upcoming 4.6 release of the KDE Platform and how is important especially in the light of the QtComponents project.

A little new feature got in some days ago: in technical terms, is a fallback chain for Plasma::Package

Wait, a what? wtfbbq?

Let’s see what this means with this video 😉 Here you see some further developments over the RSS reader we seen the last time, like a search as you type filter bar and a bookkeeping of read/unread feeds (done with Plasma::Storage, a projects of the last Google summer of code).

OGG version

But wait, there are 3 rss readers shown in that video!

The other two, shown as standalone windows, they have a very similar and coherent behavior compared to the one on the desktop, but they look completely different and have some important differences in their behavior.

They are a version targeted to MeeGo Handheld and MeeGo Tablet (the one with a two column layout, that is possible in a larger screen)

Those two version, use a (very early and under heavy development) version of QtComponents for MeeGo, that in turn uses the MeeGo touch framework theming system to have applications with the same look and feel of native MeeGo touch apps, but with a QML declared interface.

What is really neat is that those are not 3 plasmoids: it’s only one, in a package that weighs less than 80Kb 😉

Also, the proper version is automatically chosen at startup by the Plasma package system (at the moment depends from an environment variable) in the code you won’t have to put explicit switches to discover what platform you’re on. You just have to provide the files for the proper platform in the proper directory, and they will be automatically chosen respecting the specified fallback chain.

Once this is in “full steam”, we will be able to have a set of plasmoids that are:

  • Traditional desktop widgets
  • more reduced widgets for the Plasma Mobile workspace
  • “Full apps” on standard MeeGo handset and tablet
  • “Full apps” on a different mobile system, for instance one completely based on Plasma Mobile.

How this can be done?

Plasmoids are distributed in packages, with a certain filesystem structure. In the javascript code you have, when asking for a certain resource, that can be an image, a javascript file, a QML file, you just ask for a particular include, you just have to ask for an “image” called “foo.svgz” for instance (plasmoid.file(“images”, “foo.svgz”) without having to worry about the actual path.

Now, (actually depending of environment variables) the actual path of the files depend from the device used, so you can decide for instance, that when you are working in a mobile environment to replace one of the package files with other one.

Files are searched from the more device specific to the more generic ones. In the example of the video there is the chain: MeeGo tablet (or handheld) -> “MeeGo generic” -> “completely generic” (where the Plasma-desktop case is treated as the most generic one right now since is the most common).

They can be qml files, images, ui files, svgs, whatever.

if the replacement is done carefully, you will be able to have even completely different user interfaces (in this example, MeeGo handheld and MeeGo tablet) but sharing the logic of the program, that can be Javascript, if the application is simple enough, or C++ modules if needed.

Declarative Knowledge Base

BlaBla

As I described in the latest entry, with the KDE Plasma Workspace 4.6 there will be a new feature that will be a key one for the future evolution of the Plasma platform: the ability to write plasmoids with just QML and Javascript.

So, let’s try to see if it’s possible rewrite the average widget in with the declarative scriptengine…

We have a dataengine (using a neat library called Attica) that can query the various functionalities of websites that offer an API compatible with the Open Collaboration Services, such as OpenDesktop.org. One of the features offered by this API is the Knowledge Base: users subscribed to the site can ask any question (in topic with the website) and other users can answer to them. Plasma offers a desktop widget that can query and visualize those question/answers. It’s written in c++ and is about 400-500 lines of code.

How much QML code would take to write a very minimal Declarative Plasmoid that can access the knowledge base entries trough the Plasma dataengine? Here it is

import Qt 4.7
import org.kde.plasma.core 0.1 as PlasmaCore

ListView {
    clip: true
    width: 200
    height: 300

    PlasmaCore.DataSource {
        id: source
        engine: "ocs"
        source: "KnowledgeBaseList\provider:https://api.opendesktop.org/v1/\query:opendesktop\sortMode:new\page:0\pageSize:10"
        interval: 120000
    }

    model: PlasmaCore.DataModel {
        dataSource: source
        key: "KnowledgeBase-[\d]*"
    }

    delegate: Text {
        text: Name
    }
}

24 lines 😉

What is important to look here is the DataSource{} definition that defines to what engine we’re connecting and to what source. And the DataModel{} that hooks up what has been fetched by the DataSource to a suitable model for the use by the ListView.

Let’s expand from this to something that can be compared to the C++ version in terms of functionality. You can download an early example of the code from here. (all is available from the playground svn repo). It’s still early to include it in the 4.6 release for various reasons, but the path is definitely clear 🙂

Here you can see a brief screencast of the two plasmoids, the C++ and the declarative one working side by side.

OGG version

Here is a video tutorial that explains the steps taken to write this plasmoid.

It is also a little demo of the Plasmate IDE that while it’s still at early development stages, it’s pretty impressive already: all you have to do is write the code and test it in the preview side panel. zero worries about creating the package structure, desktop files or installing :p

OGG version

A Declaration of Plasma Love

Software

Declarative RSS reader The image on the left is a new (example) plasmoid that marks an important change… this is going to be a quite massive blog post, with pretty technical details about what I think is going to be a feature of an higly important strategic relevance on the road towards Plasma as a mature and powerful platform.

The Plasma declarative bindings have landed into kdebase! This means it will be possible to use the new QML language part on Qt 4.7.

As Aaron noted some days ago, QML in conjunction with now in heavy development technologies like QtComponents (and in the future Qt cene-graph) will play a key role in the creation of user interfaces in the future, and gives us a very important puzzle piece we were still sorta missing.

So we deceided to be (as usual 😉 erly adopters of the technology and with the KDE Plasma workspace 4.6 the first pieces will be in place for the roadmap that will lead us basically to this path:

  • Separate the implementation of the logic from the user interface
  • Avoid C++ (and well, any imperative language) as much as possible for the UI
  • Be flexible, an application should be able to jump between different devices as easily as possible
  • do applications that can chose the proper ui amond different choiced depending on the device used, the screen size, the input methods and what not
  • With QtComponents, use what will be the native set of widgets/components for the given platform: on a MeeGo phone, use its own widgets, theme and UI paradigms, but a different interface somewhere else
  • Performance, perforance, performance, enter Qt scene graph

So, what will have the KDE Plasma platform 4.6 of all of this?

Use QML from C++ Plasma widgets

The first pass (needed to do the following one) is to have a way to easily load a QML file into a normal C++ plasmoid. Now, loading a QML file into a QGraphicsScene (and making it well behave inside the QGraphicsLayout based Plasma widgets) is a quite simple operation, however it is a bit long and repetitive amount of boilerplate code… enter Plasma::DeclarativeWidget.

This is a normal QGraphicsWidget just like the other Plasma widgets, all you have to do is to add it in the QGraphicsLayout of the applet, set the path of a QML file in it et voil

Some updates from the mobile land

Software

Have been quiet on the Plasma mobile land lately but this doesn’t mean there weren’t developments on that, as this small video, on the usual two ugly pieces of hardware, shows two quite foundamental those days features that recently got in.

OGG version

  • Screen rotation, with a nice animation: so now screen rotation is supported both on devices that will rotate the screen in a “traditional” way, by actually rotating the screen resolution, and devices that will rely on the application painting itself rotated (such as MeeGo) in this case such kind of animation becomes possible.
  • Our on screen keyboard now has also a “compact” mode for mobile devices, you can see it there reduced on the smaller device and full on the bigger one.
  • More importantly, the keyboad knows when showing itself: when the user taps any editable text area.

Here it is also a smaller video that shows most of the things I’ve talked about in those months. (the nice musical background is by Nuno Povoa, made for the KDE4 launch)

OGG version

Plasma Mobile Widgets explorer

Software

Work on Plasma Mobile continues.

Bit after bit all the pieces come together: what’s impressing is how much the Plasma framework we have built into years is paying now.

Plasma Mobile still lacked a widget explorer: the particular formfactor really required a custom one since the one used in the desktop has a pretty different usage pattern and is targeted at a really different form factor (here we are targetting -really- small screen sizes).

I was expecting that writing one could take a quite long amount of time, after all getting there the firt time taken a fair amount of work…

I couldn’t have been more wrong. In less than two days I have now a working widget explorer, that works pretty well on small touch screens, using a mix of QML, Plasma Widgets and C++ models

The main interface is a big flicking icon grid, with a side panel that shows detailed informations on the widget (that can be scrolled with the finger as well).

To add a new widget into the screen, just click at the “+” icon positioned where the widget will be. Interaction wise is way simpler than the Plasma Desktop mechanism, because of both precision of the input device (where with device I mean a fat finger :p) and of screen size (where with size i mean actual phisical size, not pixel resolution)

This little video shows it in action on the usual device. ah, and a curiosity, at some point you see the screen switches to an activity with a big numeric keypad.. that’s not a mockup, as Artur announced during Akademy, if it runs on a N900 phone, that can do actual phone calls.

OGG version