Added more wildcards to the Gitignore

Gitignore is now ignoring callgrind files and kdevelop
projects, this was annoying me.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Created a placeholder for the Equipment Edition.

This creates a placeholder for the equipment edition,
it will ease the 'revert' and 'apply' when editing
multi dives.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Revert to the old values of Cylinders and Weigthsystems on cancel

This patch enables canceling the edition of cylinders and weigth
systems, as soon as the user press cancel, the old values are
re-populated on all selected entries.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Enable Edition by clicking anywhere on the Cylinders and Weigths.

This patch enables edition on the selected dives as soon
the user press delete or any other column on the Cylinder
/ weigthsystem.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added a 'changed' member on Cylinder/Weigth models to know when to Apply a change.

Added a 'changed' member on Cylinders and weigth models to mark when
one was changed or not. Only the changed data should be inserted on
the selected dives, so if the user changes the cylinders on a multi
edit, there's no need ( and it will actually break things if we did that )
set the weigths too.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Only mark dive list as changed if 'Accepted' was clicked.

The old code marked the dive list as changed on any
of the changes in the model, this was incorrect since
the user could just cancel the edition, wich means
that the divelist shouldn't be marked as changed at all.

when the user clicks on'accept', and the item is indeed
changed on the dive list, then we mark_divelist_changed
to TRUE

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Code cleanup - create a method for cleaning the Palette.

Code cleanup, create a method for cleaning the palette,
less code is better in this case. :)

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Set the Cylinders and Weigths to all selected dives after pressing 'Accept'

This bit of magic actually performs the save on the
dive list for the changed weigths and cylinders,
it will set the cylinders only if there's a change
on the cylinder model, and it will set the weight
only if there's a change in the weigth model.

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

Fixes a couple of whitespace issues.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Hook 'Add' from cylinders and weigths to enable Edition

This code hooks the plus button on both cylinders and
weigthsystem tables to trigger the enableEdition() and
thus the work done when you click on + will be saved /
discarted when the user cancels the plan or accepts it.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Make the Qt ComboBox behave in a Better Way

So, the ComboBox is a beast, and when used on a Delegate
it's very hard to get things right, wich is a pitty, because
I overly like qt. So:

1 - Combobox needs to show the popup when user press ↓ and ↑ keys
2 - Combobox needs to select when user press enter, not twice.
3 - Combobox neesds to select when user selects from the mouse, not
pressing enter after.
4 - Combobox needs to not mess with stuff when moving around.

Everything that I listed there works on a non-delegate combobox,
but for some reason, a delegate missed those, so I reimplemented
all. not nice, but now we have a code that will work, I hope.
*fingers crossed*

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