KDE

NodeLayout for Plasma

Yes, it’s that time of year again - the time for backporting layouts from Lancelot to Plasma.

NodeLayout is one of the most powerful layouts in general, in a sense of that it’s expressiveness for positioning static content is greater than any current layout in Plasma.

The idea behind it is to help developers avoid creating multiple different layout objects mixed and nested in each other when creating complex UIs. It’s a bit trickier to get the hang of it - the nodes definition, but once you get to know it, it will become your natural way of thinking. :) (yes, I know I’m sounding like a shampoo commercial)

Every item’s geometry is defined by two nodes - one for the top-left corner, and the other one for the bottom-right corner.

Each node is defined by a pair of relative (xr, yr) and a pair of absolute (xa, ya) coordinates. The calculated node coordinates depend
on the size and position of the NodeLayout object in the following manner (layout is the geometry of the NodeLayout):

  • x = layout.left() + (xr * layout.width()) + xa
  • y = layout.top() + (yr * layout.height()) + ya

Alternatively, the item’s position can be defined by using one node and one pair of relative coordinates (xr, yr). In that case, the item is sized following the sizeHint(). The relative coordinates (this time they are relative to the item’s geometry, not the layout’s) specify what point of the item will be bound to the defined node.

Note: The horizontal and vertical values are completely independent so you can, for example, have automatic (sizeHint defined) sizing for width, and fixed sizing for height.

Lancelot icon

Lancelot icons


Bridgekeeper: WHAT… is your name?
Lancelot: Sir Lancelot of Camelot.
Bridgekeeper: WHAT…is your quest?
Lancelot: To seek the Holy Grail.
Bridgekeeper: WHAT…is your favorite color?
Lancelot: Blue.
Bridgekeeper: Right, off you go.
Lancelot: Oh! Well, thank you. Thank you very much.

I got bored while waiting for the green light for committing the NodeLayout (later about that) to libPlasma, so I decided to make a nice icon for Lancelot. I had a couple of ideas - shield, knight, helmet and a grail.

Shield was not a great solution since people would think that it has something to do with computer protection, and knight and helmet (IMHO) are suited more for a game like Wesnoth then for an application launcher. So i have made a grail.

Applet Browser in libplasma

Plasma Applet Browser

The Plasma Applet Browser is now integrated into the libplasma and it will be available in the next Beta that is going to be published on Wednesday.

I’ve replaced the old drag-and-drop with a bit fancier stuff - now (as you can see in the screenshot) when you drag the plasmoids, you will be shown only the icons (possibly will be replaced by screenshots of plasmoids) not the whole “blue bars” you saw last time.

At the moment, you can add only one applet at a time by dragging, but that will be changed soon. If you use Oxygen style, you’ll encounter a nasty bug concerning the drag-and-drop-icons - there will be no icons, only nice shades of gray… but that’s not my fault.

On the road again

Last week was dedicated to returning the Kamion (Truck in English) project on the road again. The new band consists of Pedro, Andy, Toke, Ljubomir and Luca, and I’ll be a roadie. :)

So, now I’ll be getting back to Plasma development and moving the Applet Browser into the libplasma (finally), so that I can focus on the Lancelot development after that. In one of the last posts you have asked for mockups or screenshots, and I didn’t want to provide them. I still don’t, but here is a part of the mockup :)

Lancelot mockup - Part

Maybe you’ll get the idea of the extenders I mentioned last time.

Lancelot - answer to DanaKil

WARNING: Contains NO spoilers! :)

DanaKil: “Great great :)

and I’m curious about your “Lancelot”… nice name btw, and smart pun for a french speaker (”lance” can be translated by “launch”) ^^”

Well, the name occurred to me when I made a superkaramba applet for myself (never have published it) for faster launching of my favorite apps. Lancelot - as launching-lot (lot as in parking-lot). And I have used the name Sir Lancelot sometimes as my alias (and yes, I’m a Monty Python fan).

Since then, Lancelot have changed. Mainly because of one of the commit-digests, due to which people thought Lancelot to be a kmenu replacement like Kickoff and Raptor. It was not intended to be anything of the sort.

The main idea that was guiding me was to create a simple application launcher (and nothing more than that) that would have a no-click (Absolutely No Click Needed At AllTM) interface.

Commit digest just gave me the wings. Things have changed - instead of making a simple Plasmoid, I started a separate application that uses libplasma for implementation (similar to what Amarok team is doing) that is going to have all needed features for an ALI.

The thing is that majority of users adore kickoff, while I hate it. I like the general idea behind it, but IMHO the layout is a bit wrong, categories too, and the non-favorite application browsing is painful. I wanted to address these issues in my own particular … (idiom sir?) … yes idiom.

Lancelot is, at the moment, only my experiment with which I want to achieve a couple of things:

  • Testing area for more complex no-click user interfaces
  • Development incubator for Plasma (FileBrowser, KioBrowser, BorderLayout were backported from Lancelot to Plasma)
  • Possibility of having Plasmoids in an ALI - customizable ALI
  • KRunner in the ALI
  • Having an alternative if I don’t like the default ALI for KDE 4.0 (yes I’m being a bit selfish :) )

Well, that’s all clarification that I’ll give at the moment - no mockups nor screenshots yet - as I’ve said “no spoilers”.

p.s. If there are people who like when KDE applications have K in their name, you can call it Knight Lancelot :)

New Plasma stuff

While waiting for Aaron (it’s hard to write his name properly instead of AAron, isn’t it?) to give me the instructions for merging the Applet Browser into the libplasma, I had to do something interesting to keep me warm.

The first thing is that the FileBrowser engine is moved from playground to the plasma’s trunk. If you don’t remember, the engine gives you the ability to monitor files and directories for changes, to retrieve file meta data etc. and all of that from inside the Plasma applets.

The second thing is a new Plasma layout named BorderLayout. It is inspired by the Java’s java.awt.BorderLayout. I needed something like this for my not-yet-to-be-revealed-launcher Lancelot. It can contain up to 5 items - one for each border (left, top, right, bottom) and one for the center. Since it is easier to show it, than to describe the actual layout, here it is:

Top
Left Center Right
Bottom

The sizes of the borders (width for left and right, and height for top and bottom) can be calculated using the sizeHint of the items (default), or can be user-specified (developer-specified).

And, finally, the last thing that is not in the SVN yet is the KioBrowser engine, which retreives list of ‘files’ at a specific KIO location (for example applications:/, system:/)

p.s. The OpenID+ plug-in has some fatal error while activating, and I don’t have the time to fix that - so no openID identification on this blog yet…

New Plasma theme, and a new blog

Well, first of all, I’ve moved my blog away from Blogger to my own domain powered by the all-mighty WordPress. The first step was to make it look unique an pretty - so a new WP theme was born.

Then I thought of what would be fit to celebrate the moving, and it just occurred to me - why not make a Plasma theme that will be based on this blog design? Making a Plasma theme is surprisingly easy job so I encourage you all to give it a try.

The only obstacle I had, was that the painting of the borders was done by repeating the border pattern, and I needed my borders to be stretched. So, after a small patch to the Plasma’s background painting routine, Plasma now has the ability to paint both pattern (default option) and stretched background borders. The only thing you need to do if you want your borders to be stretched is to create an object in the SVG file called “hint-stretch-borders”.

Here’s a obligatory screenshot of a couple of more prominent widgets using the new theme.
My Plasma Theme Screenshot

P.S. One thing more about the new blog is that for validating user comments I’ve activated the reCAPTCHA system that helps in digitalizing books by giving you (people that make the comments) words that the OCR can not understand

Plasma Applet Browser Screen-cast

After a couple more tweaks to the P.A.B. I’ve made a screen-cast I’ve promised in the last post.

The main visible change since last post is that the items are smaller so that more applets are shown at once.

EDIT: There are some clarifications in the comments section that I am to lazy to digest and write here, so before asking questions, please read them.

Plasma Applet Browser

If you remember, in my last blog wrote that I’m searching for someone to finish the KCategorizedItemsView widget for Plasma. And I got lucky yesterday - I volunteered for the job. Yes, that’s right, I’m volunteering to finish the project I have no time to finish. :)

So, what has been done yesterday?

  • First of all, the widget/dialog is redesigned to follow some Aaron’s suggestions. The categories list is removed and the categories are in the drop down on the top.
  • The new delegate for painting the list items is awesome and cool, and awesome, and … did I mention cool?
  • It has a clickable star for making an applet favorite/bookmarked.
  • It has emblems for applets that are under special categories such as ‘Recommended by KDE’ and ‘Used in past’.

Everything mentioned before is enclosed in the KCategorizedItemsView widget which can be reused outside of Plasma.

As for Plasma-specific stuff, you can now use the browser to add the applets to the desktop in a drag-and-drop style.

You’ll have to wait a bit for the screenshots/screencasts because I’m doing a clean KDE4 build at the moment - so it’ll take some time.

KCategorizedItemsView for Plasma Applet Browser in SVN

First the screenshot:

Here goes the message I have just posted to panel-devel:

It is a general purpose displaying component with categories a on the left
side, search bar and filters on the top. (the thing we’ve discussed earlier
on this list)

The state of the widget is as follows:
* The UI layout is finished
* Abstract classes for models/items defined
* All filtering capabilities working (categories, search and special filters)

What needs to be done:
* The Delegate for the items. The curent implementation of the delegate only
renders the item in a fancy [but ugly] way, but does not provide the favorite
alteration icon, nor ‘more details’ option.

NOW THE IMPORTANT PART:
Since I have no time to continue working on this at the moment (exams, bloody
exams), I have submitted the code to the SVN.
(trunk/playground/base/plasma/appletbrowser/)

So are there any wolonteers for the only TODO item that needs to be finished
before it can be used in Plasma?

Cheers, Ivan

p.s. I hate QT’s model/view design…

« Previous PageNext Page »
Powered by WordPress
Copyright by Ivan Čukić, Foment Group