Fixes breaking the sizes of the columns of the listView.

tis just proves one point: I'm retarded.
I moved some code around and forgot to close the old group,
so I created a group inside 'MainWindow' that handled the ListWidget,
wich was not the right thing to do at all.I

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Moved the code that handled DiveList Columns Sizes to it's correct file.

I got a bit lost trying to find the code that handled DiveList columns
today, so I tougth it was better to move it to his file, after all we
do have a divelistview.h :)

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Save the status of the tree before trying to reset the display.

This is a try: when the user changes the orientation on the columns
by clicking on the title of them and organizing by something that's
not the number, we lost track of the opened branches. this commit
doesn't fix that, but it fixes a possible similar issue.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Save / Restore the Tree after organizing by other columns.

This patch saves and reestores the state of the TreeView
after the user clicks on another columns that will make
the tree disappear. All of the branches state is saved,
this way the expanded nodes will be reestored when the
user gets back to tree mode.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Fixes bug 226, garbage was left behind when canceling edit dive.

Garbage was left behind when canceling edit dive, and thus when
the user setted his dive to be editted, after a first canceled
edition, all points of the first edition got messed up and showing
on the second dive too. if the user clicked 'ok', he got a really
bad surprise.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Removed inconsistency when user tried to add dive while planning.

The user could add a dive, and in the middle click on the 'plan'
button. Since we didn't cared about that on the widget, a lot of
inconsistencies could occour. this fixes that by setting a flag
on the Planner, that has now three modes: nothing, plan and add.
( maybe in the future an edit mode will be valid too. )

if in 'NOTHING' mode, user can enter the addition, edition and
planning. if in any other mode, user can't do a thing. the mode
gets back to NOTHING when user accepts or cancels a plan / add
/ edition.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Forgot to remove this debug, sorry.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>