Moved the 'create fake dc' to it's own function in device.c

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

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Save / Restore toolTip information position on the Profile when switching dives.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Implemented the movement of the ToolTip by Hand.

Reimplement the movement of the tooltip by hand,
we were adding / removing childs of the tooltip
quite often, wich broke the movement of the item
using the default behavior, aparently Qt uses
a cache of the transformation of the item, assuming
that the bounding box of it will not get modified
while dragging. wich in our particular case, is
a falacy.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added the option to create a new dive from the menu.

This patch adds a dive from the menu, it's the dive that will
be used to add a new dive plan. so, I also removed the option
'add imput plan' from the menu.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added a 'Plan' mode and a 'Dive' mode on the profile.

Added a 'Plan' mode and a 'Dive' mode on the profile. Those modes
tell the application what can be done: Plan - the dive's dinamyc and
can be changed, 'Dive', the dive is fixed ( most probably downloaded
from a dive computer and it's readonly. ) - now I need to properly
populate stuff.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added a simple "TextEditor" in the graph, for a plan mode.

Added a simple TextEditor in the graph for the 'Dive Plan' mode,
this text editor is very simple, so the user can double click on
'depth' or 'duration' to set the depth or duration of the dive.
Since this was a test, only 'duration' was done, and I'll add
duration on the next commit.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added a slot to set the full time of the dive plan

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