List Info

Thread: KListView started, and almost ready




KListView started, and almost ready
user name
2007-04-03 19:31:11
Hi all,

I want to introduce two new  classes I would like to commit, if no one disagrees:

- [kdelibs/kdeui/itemviews] KListView: This class inherits QListView, and its purpose is to draw correctly new categories.
- [kdelibs/kdeui/itemviews] KItemCategorizer: The categorizer interface. KListView will ask if a categorizer was set, if it was, it will ask for each item in which category is it (asking for the role that was sorted the model, that must be a QSortFilterProxyModel). It needs to be reimplemented for different views.

The patch is at http://www.ereslibre.es/kdelibs.diff

Writing a 5-line-patch to Dolphin I had this results: http://www.ereslibre.es/categorization.png

Well, as you will have noticed I still have some work to do, like handle hovered items and drawing categories correctly (making new lines), what will need the reimplementation of visualRect at KListView.

Before doing such work, I wanted to introduce you this class and know your thoughts and comments. I think this has been a long-missed feature on our list views and now we can handle it easily.
 
Bye and thank you,
Rafael Fernández López.

PS: For handling joining items I will need to hack a bit on KStyle, let's see how hard that gets... I hope not so much...
Re: KListView started, and almost ready
user name
2007-04-04 00:00:23
Hi again,

And yes... despite the fact that I'm getting some issues when painting and there are some // TODO's for reimplementing methods from QListView, you can reproduce the main idea of KListView. Well, categorizations will be drawn more cute and so on... but this is how is getting by now, the first day of KListView live

http://www.ereslibre.es/categorization2.png

When have something better (that won't do strange painting when scrolling) I will send the updated patch

Bye and thanks,
Rafael Fernández López.
Re: KListView started, and almost ready
country flaguser name
Netherlands
2007-04-04 02:16:00
On Wednesday 04 April 2007 02:31, Rafael Fernández López
wrote:
> I want to introduce two new  classes I would like to
commit, if no one
> disagrees:

What about first adding it to the application(s) that are
interrested in the 
features this brings and let it mature in the application
itself.
Then when its actually requested to be used by another
application, we can 
think about moving it to kdelibs.
-- 
Thomas Zander
Re: KListView started, and almost ready
user name
2007-04-04 02:39:37
I think is a good solution, but my idea was that plenty of programs could use it: open/save dialogs and all applications that want to show a QListView. Why ? Because if you don't set a categorizer it will behave *EXACTLY* as a QListView, and if you set it, you will have your items categorized.

I know there is that policy to add a class to kdelibs (at least 2 programs needing it), but I see this like lots of programs could benefit from.

Bye and thanks,
Rafael Fernández López.
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )