GSoC – After Five Weeks

We are in the sixth week of the Google Summer of Code program, and so far it’s been both a challenge and a great experience to do development together with the Nepomuk-KDE team. In the meantime (last Friday) I have finally managed to submit my Masters thesis, and will be wrapping it up with a presentation given to my fellow researchers at DERI.

When I first set out undertaking this project, my mentors and I had two main goals and a third optional one. With this post I’d like to report on how and to what degree have we managed to accomplish the first two.

Displaying and Editing Items

I started with the second main task, i.e. displaying and editing items. For that we have decided on the following approach:

  • Have a custom Model, View and Delegate for Nepomuk items. The Delegate is expandable, and when it is expanded, a  ResourceEditWidget is used to handle (display and edit) a resource.
  • ResourceSearchWidget takes the above three, together with a query builder and a facets widget to provide a convenience widget for searching. It is used as the main GUI of the application as well as in PropertyEditWidget (see below).
  • The ResourceEditWidget displays the icon and rating and queries for a plugin based on the resource type. If a plugin is found, it is used, otherwise a generic fallback widget is created. The fallback widget uses PropertyEditWidget instances to display and edit properties (this can also be done by the custom plugins).
  • PropertyEditWidget is a widget for displaying and editing properties. For displaying (read-only mode), it uses the label or the value of the properties, based on the type. For editing, it provides a custom editor, based on the range type of the property.  The editor’s behaviour depends on whether we have a single value or multiple values for the given property:
    • For single values, it is quite simple. If we have a date range, it will display a KDatePicker, for a string it creates a KLineEdit, in case of an int it uses a spinner, and so on. For non-literal resources it creates a widget that allows to add a new resource (using NewResourceDialog from nepomukutils) or search for an existing one (using ResourceSearchWidget).
    • For multiple values, the approach is based on the first one: for each of the values it creates a disabled editor and a – (remove) button, and places a + (add) button at the bottom. Thus, values can be removed or new ones can be added.
Displaying a Task item

Displaying a Task item using its custom plugin

Editing a File item

Editing a File item using the generic fallback

Query building

At the beginning we didn’t exactly know what approach this query builder should take, but in the meantime we figured out that it will actually be quite simple: take the search widget that has a query editor, a widget with facets and a widget displaying the resulting items. The user can the query customizing the query editor and the facets widget, until they are happy with the result, thus having built the desired query.

Now, this can be extended with adding more advanced features, like auto-completion to the query editor, or one could even take the main components making up the search widget and manually assemble them to fit one’s own purposes.

What’s next?

The following immediate steps will be to polish the editing of multiple values, perform general cleanup on the core display/edit mechanism and the UI, implement the facets widget and create custom plugins.

It also seems like there will be time for other things, such as to deal with the third main goal (to define custom actions on the resources) and other cool stuff Sebastian or Evgeny come up with.

Advertisements

3 Responses to “GSoC – After Five Weeks”


  1. 1 Storm October 1, 2010 at 8:46 am

    Hey,
    Any news on the latest from this project?
    Cheers

    • 2 Oszkar Ambrus October 1, 2010 at 8:50 am

      I just wrote the follow-up blog post for this yesterday, as a conclusion to my GSoC work 🙂 I’ll just read it again and try to publish it today. Thanks for your interest!


  1. 1 GSoC – The End « Oszkar’s Developer Blog Trackback on October 1, 2010 at 4:14 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





%d bloggers like this: