Fwd: Qt Divelist sorting..

Tomaz Canabrava tcanabrava at kde.org
Thu May 23 11:15:06 PDT 2013


Sorry to repost, dummy cellphone mail app send just to linus.

---------- Forwarded message ----------
From: Tomaz Canabrava <tcanabrava at kde.org>
Date: Thu, May 23, 2013 at 2:45 PM
Subject: Re: Qt Divelist sorting..
To: Linus Torvalds <torvalds at linux-foundation.org>



Em 23/05/2013 13:08, "Linus Torvalds" <torvalds at linux-foundation.org>
escreveu:

>
> Ok, trying to get the current subsurface master to work for me, and it
> mostly does - except sorting is horribly broken.

Yes, Dirk explained to me on how he wants to do the sorting ( changing from
tree to list while clicking on any column that's not the '#', changing back
to tree when clicking on '#' while maintaining selection) but I didn't had
time to implement that yet - I'm currently implementing the Equipment tab
'edit' on cylinders and weigthsystems.

>
> It looks like all sorting is just plain alphabetical. Correct?

Correct, it's the default behavior and I didn't changed it yet.

> I figured out that in Qt, the way to override the sorting is to write
> a "lessThan()" function in your own QSortFilterProxyModel subclass. I
> found this:
>
>   http://qt-project.org/doc/qt-4.8/itemviews-customsortfiltermodel.html
>
> and then I decided that there's a lot of boilerplate Qt code that I'd
> be better off asking Qt people to write.

I'll do as soon as I finish the equipment dialog edition (dirk asked me to
get rid of the popup dialog and do the edit in place)

> I can happily write the actual sort functions (but most of them are
> trivial integer comparisons, so that's admittedly not much of an offer
> ;^), but the whole hookup thing? Might I ask somebody who is clearly
> more comfy with this to do that? Tomaz?

Yah, no trouble at all. I will create the QSortFilter model stuff to do
that.

> Sorting the dates by alphabetical string is kind of sad.

=)

> Btw, the new map is beautiful, but the resolution of the thing is
> insufficient to actually add map markers.

This is being talked about on irc, maybe you can also join the fun here for
a moment. ^^, that map is insufficient for two reasons. First is that it is
an offline map, so if we stored a very high res it would be huge.
Second is that it's not connected with any map providers on the Internet
yet. Marble is capable of using the openstreetmap and friends (openseamap
and openbikemap) so this is not the issue.

The issue is that on Globe mode (instead of Plain) the openstreetmap is
horrible and broken.

I'm trying to make it use globe + blue marble skin while on low zoom and
plain + openstreetmap on high zoom.

What you think about this approach?

Tomaz
>                     Linus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130523/7b44621b/attachment-0001.html>


More information about the subsurface mailing list