Adds the code to make the dive list behave like tree or list

This code adds the possibility to make the DiveList behave
like a Tree or a List, depending on what layout is set.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Switch between Tree / list on column - click.

This patch adds support for switching Tree / List
while clicking on a column header. This triggers
a sad-painting bug on the list - I guess I'll have
to fix it too. I'd apreciate some help on it, tougth.
next: keep the selection.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Saves the selection to select it later.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Merge branch 'bug111' of https://github.com/tcanabrava/subsurface
Add a "sort role" for sorting the dive list

By default, sorting is done by the display role, but then we end up
sorting by the string we display, which is almost always the wrong thing.

So this adds a new "SORT_ROLE" that is used for sorting, and then the
data lookup can return the raw data we want to sort by.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>