Fix inconsistent position of screen splitters

I basically rewrote the way we handled the splitters. It now uses a state
to know what it's doing, and will only update the value of the
saved-to-disk splitter size if the state shows the splitters (currently
only VIEWALL), where all the other states should hide the splitters, and
the values of the splitters don't matter.

Fixes #225

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fixes breaking the sizes of the columns of the listView.

This 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.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Moved the code that handles DiveList column sizes to its correct file.

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

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.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 restores the state of the TreeView after the user
clicks on another columns that will make the tree disappear. All of the
branche states are saved, this way the expanded nodes will be restored
when the user gets back to tree mode.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fixes garbage left behind when canceling edit dive.

Garbage was left behind when canceling edit dive, and thus when the user
set 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.

Fixes #226

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>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Forgot to remove this debug, sorry.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Don't access a NULL path

This can happen if the Uemis is not correctly connected, but the user
still has the path set (as default DC most likely) and tries to start a
download.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
After done with the DC download dialog, ensure it's in its original state

So in case the OK button was relabeled to 'Retry', relabel it back to OK.
Also, 'Retry' should be capitalized.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>