Change how the handler handlers itself.

This patch adds a itemChange method, that emits a 'changed'
signal when the handler is moved. I'll use that signal on
the profile to call the correct method.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make the planner actually work.

This commit makes the planner actually work. There ar still
a few edges, but oh, joy - the new Profile gave a very unexpected
and nice addition to it - Grab the last handler of the initial
dive, and move it to the right, or get any handler, and move it
to the bottom to see what I mean.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fixe movement of DiveHandlers when moving the NotificationArea

The QGraphicsView system moves every selected item when the user
clicks and drags one. This patch makes a cache of all selected
items and removes the selection on them. When the user stops dragging
the Notification, the selection is restored.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove code already ported to the new profile.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove unused code.

This code is not ported to the new profile, but from what I
can understand from it, it doesn't need to be. The purpose
of this code was to setup the correct colors and strings
for the current mouse position, we already do this on the
Profile in a different way, on the Notification Area.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make mouse dragging work as it should.

This patch makes mouse dragging work as it should, a tiny
bit different than the old version, but I think it's a better
way. What's missing: Keyboard actions.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the depth / time increase and decrease functions.

The new profile code handles the resizing of the profile area in order to
accomodate the depth and time of the dive much more intuitively - the old
manual buttons to do so are no longer needed.

This also removes a few other unused methods.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove a ton of code.

The code removed was already ported to the New Profile.
We managed to clean quite a bit. huhhy

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove export and save as from dive list context menu

The context menu is getting way too big and confusing. This is now much
more cleanly done from the File->Export dialog.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add some helper functions

First step towards getting the "add to trip" logic in the divelist context
menu to be consistent and correct.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Port the KeyPress actions to the new profile.

[Dirk Hohndel: combined two commits into one and cleaned up some
               whitespace issues]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>