Showing posts with label gsoc. Show all posts
Showing posts with label gsoc. Show all posts

Jul 18, 2011

Back to Plasma Components

This last month I've been working slowly on my GSoC project due to the university activities (due to Brazilian academic calendar). And my thesis, which I shall talk in other post. But at least now I'm undergraduated!

As I explained in my last post about Plasma Components, my GSoC project. I'm building graphics components for developers to build plasmoids in QML using non trivial common components such as Sliders, ScrollBars and RadioButtons. After the break I've done these components following the Qt Components common API:
  • Switch
  • ButtonRow
  • ButtonColumn
  • ScrollBar
  • ScrollDecorator
Keyboard event handling and focus policy for the new and old components were added in this sprint. I also spent a lot of time refactoring some components. I think their code is much better now.

I'm also adding more complex use cases at the components gallery (at kde-runtime/plasma/declarativeimports/test/gallery). By the way, this is screenshot of the new gallery:

Plasma Components Gallery 

Part of the work was just straightforward, but there are some doubts I would like to ask which you think is the best, because some of the components behaviour are not defined.
  1. Should ScrollDecorator appear only when it's flickableItem is flicked, like in the mobile use case?
  2. ScrollDecorator must should look like ScrollBar or have it's own appearence?
  3. There are no SVG graphics for CheckBox, RadioButton and Switch. Currently there are placeholders. What can I do?
  4. Currently, when you click a component, it gains the focus. This logic must be in the components as it is? Or should left it external to the button.
  5. The Qt Components doesn't define any enabled property, for any components. I think it's important to have such a property in all interactive components. What do you think about it?
Any other tip/suggestion is highly appreciated.

I expect to give other update as soon as I have something more to report.

May 19, 2011

Plasma Components

Hi,

I'm here to talk about my GSoC project (\m/), the plasma components. As you may know, QML is a declarative language to build rich interfaces introduced in Qt 4.7 by providing simple primitives. As it is a powerful way to develop interfaces and it's the future of UI development for Qt was necessary to make the plasma support it.

Create interfaces in QML is really easy and fast but sometimes we need common widgets and may be boring to reimplement and replicate them in every application we create (e.g. Button, Slider, ScrollBar). For avoid this code replication, the Qt Components project was created to unify an API for a set of components.

The current (often updated) defined components and it's API can be found at QTCOMPONENTS-200. The Qt Components intends to be a cross platform, but sometimes we need to have a closer integration of the component and the platform. In plasma desktop we want to show tooltips or use the theme svg images for example. The common API defines a set of properties a component must have, but doesn't disallow to have extra properties and functionalities (suggestions ?). Creating the plasma components with the theme integration and adding plasma behaviour is what my GSoC project is about :-).

I already started working on the plasma components. They can be found in the kde-runtime repository at the plasma/declarative branch. And more speciffically in the plasma/declarativeimports/plasmacomponents directory. The components which already there are not yet done, they lack of tooltips, keyboard events handling, focus policy, and some (CheckBox and RadioButton) hasn't images yet. However they're fully functional and they cover all the properties and behaviours defined in the common API. Here is the list of the components in this state mentioned above (until this post publication):
  • BusyIndicator
  • Button
  • CheckBox
  • RadioButton
  • Slider
These are components not present in the common API but they're highly wanted in plasma:
  • ScrollBar
  • ListItem
  • ListItemView
  • ListHighlight
To test these components, its also kept a components gallery (plasma/declarativeimports/test/Gallery.qml) that you may view it with qmlviewer (after installing the components).

Gallery screenshot
Feedback is highly appreciated. ;-)

Cheers!