ok, second try: make use of KDirSortFilterProxyModel. 'Show in Groups' still works, haven't tested nepomuk part though.
NOTE to dolphin devs: please, consider using 'left.column()' instead of 'sortRole()' in lessThan methods, and 'sorting()' instead of 'sortRole()' in other places.
Didn't make switch by myself because it needs nepomk testing (shouldn't be too hard though).
Robert Knight [Mon, 23 Jul 2007 23:08:47 +0000 (23:08 +0000)]
Fix a couple of crashes. First was to avoid problem caused by KIconLoader::global()->theme() returning 0 (which according to the API, it can do). Second was to fix the 'lastIndex' member of KCategorizedView::Private being out of date when used. According to the comments this member existed as an optimization. However in the only function where it is used, scrollbar updates are also performed. This will be several orders of magnitude more expensive than the 3 constant-time operations on Qt containers (QHash,QList) which the optimization avoided. So I removed the 'lastIndex' member and moved the calculation to where the data is needed.
change XDG_APPS_DIR -> XDG_APPS_INSTALL_DIR, XDG_DIRECTORY_DIR->XDG_DIRECTORY_INSTALL_DIR, DBUS_INTERFACES_DIR->DBUS_INTERFACES_INSTALL_ DIR, DBUS_SERVICES_DIR->DBUS_SERVICES_INSTALL_DIR to have same naming convention as discussed with Alex.
Peter Penz [Sun, 22 Jul 2007 19:28:47 +0000 (19:28 +0000)]
Use KDirSortFilterProxyModel::naturalCompare() to prevent code duplication. DolphinSortFilterProxyModel::lessThan() still contains similar code like KDirSortFilterProxyModel::lessThan(), but we will discuss this with Rafael in August (it's open yet whether KSortFilterProxyModel should be derived from KDirSortFilterProxyModel or not...).
Peter Penz [Wed, 18 Jul 2007 21:05:47 +0000 (21:05 +0000)]
QAbstractItemView::viewOptions() only returns an instance of the class QStyleOptionViewItem, so the text wrapping property of QStyleOptionViewItemV3 will never be set -> check whether wrapping has been enabled inside QListView
Peter Penz [Wed, 18 Jul 2007 20:34:40 +0000 (20:34 +0000)]
When derived classes overwrite KCategorizedView::visualRect() to adjust the visual width or height, drawing errors occur as internally always d->visualRect() is used -> always use KCategorizedView::visualRect()...
If we have different heights on the same row, make it possible to update taller items correctly when the mouse is over the part that goes "out of the little one" line
Take in count item sizes. As we want all elements of the same size we check for the biggest one. This way we have visible columns too, what makes everything more ordered,
and to the user eye as well.
Make KListView capable of drawing categories on our own way. This make things easier
when we are trying to customize it. We can also benefit from KStyle if some day it
supports category drawing.
KListView keyboard navigation. Tricier than I thought.
Pending renaming to KCategorizedView. Seems a good name.
David Faure [Mon, 2 Jul 2007 17:24:54 +0000 (17:24 +0000)]
Change signature of requestItemInfo signal, to avoid fileitem -> url -> index -> fileitem roundtrip in dolphin,
and to match the BrowserExtension mouseOverInfo() signal.
Started to implement more of the part (e.g. spinning wheel in konq).
David Faure [Sun, 1 Jul 2007 14:25:21 +0000 (14:25 +0000)]
Here comes dolphinpart, to use dolphin as the file management view in konqueror.
Embeds nicely, now all the integration needs to be done.
Thanks to Peter for the nice DolphinView/DolphinViewContainer separation which made writing the part very very easy!
Peter Penz [Wed, 27 Jun 2007 15:15:29 +0000 (15:15 +0000)]
Fix the following reproducible crash in a slightly different way (reported + initial fix done by Rafael):
* Open Dolphin. Enable categorization.
* Split the view. Disable categorization on the right one.
* Join the views.
Fancy dragged items. There are two bad parts of this story: the hardcoded value of
the opacity and the break-of-unification between QListView and KListView. This
will be removed for sure, just for testing reasons.
Small fixes, but that have an impact of how things are visualized.
* Move "not tagged" elements to the end. We sort the rest (when they have tags), but keep untagged elements (the category) at the end of the view, since the user had
"less" interest on them.
* Break the law again of "dirs first". If we have on a folder only a tagged file (and is a file) and the rest are folders, that file goes first, since it was tagged.
* If we are on the same category, dirs go first. Here we make them citizens of first class.
* Commas instead of spaces when building categories for tags, they make it more readable and less error-prone (we can have tags "a", "dog" and "a dog" as tags, right?,
so spaces here make the thing a bit hard to distinguish, I have two tags "a", "dog", or the tag "a dog") ;)
* Return an empty string when the item is not tagged at the method tagsForIndex. This way we always show untagged items the latest ones very easily (without nasty string
checks). We will let the categorizer put a fancy name for them, if the returned string was empty.
Peter Penz [Fri, 22 Jun 2007 16:42:34 +0000 (16:42 +0000)]
Implement sorting by "tags". Same performance problems occur as when using sorting by "rating", but we must get a feeling first how we use the Nepomuk API before thinking about caching...
If we are sorting by rating, we won't apply the general rule: folders before regular files. The user said that was more interesting for him/her, so we respect his/her
decision. In this case folders and files are citizens of the same class.