Started the code for the Profile Plotting

This small patch adds a new class - ProfileGraphicsView
it's a QGraphicsView based class that will holds all
graphics-items for the plotting.

The setup is simple, just call ui->ListView->plot( dive )  ( that's
already a ProfileGraphicsView and magic will happen.

Since Im using a QGraphicsView , the size of the canvas doesn't
matter and I'm fixing it at 0,0,100,100. when a resize is done,
the resizeEvent will be called, fitting the scene's rectangle on
the view.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Converted the Colors.h code to Qt

The colors on colors.h were done to fill a special
struct by Subsurface - I removed that structure and
replaced the code that generated the map of colors
to a QMap. I know that this changes are not very
'welcomed', but C++ has issues on creating & initializing
complex static members, this was the best way that I could
think of.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Moved the plot from the cairo version to the Qt version

Started working on the Qt version of the Plot, initially
nothing is printed - but this is not a bad thing,
the program doesn't explodes too. :)

some work had to be done about the 'bool/gboolean' stuff
so I removed all gbooleans in the code that I'v encountered.

A new file was created ( profile.h ) so I could put the
signatures of helper methods that cairo used to call.

till now the code computes the max limits.
Next patch the first drawing will be made.

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

The first plotting method was removed from profile.c
to profilegraphics.cpp and some conversion ( almost 1 to 1 )
was made so that the code could work.

Since the code is big - this commit has just a part of it
working - it plots the grid. but already works for testing
the resizing of the window and Zooming ( unimplemented )

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Plot of the Mean Deph

The mean depth now is plotted correctly.
I wanted to do more stuff on this commit, but since
it required that a few things on profile.c got moved
to profile.h, commited to not have a huge blob for review.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added the code to plot the actual Graph.

This version already plots the dive-graph, with the
gradient and all that jazz. One thing that will be
easily spotted is that the size of the line is very
thick - easily changed, I'm just using the default.
As soon as everything is plotted correctly I'll
fix the lines.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Finished the port of the plot_profile code.

There are a few regressions, mostly because the text
is not being plotted yet and the background of some
of the curves are not being applied.
This is because QGrapdien is based on the coordinates
of the items that I wanna paint, but I'v setted a
QGradient that's global and doesn't take this into
consideration.

all curves are being plotted. in Small resolutions
they plot bad. but it's just a matter of redrawing
in the correct resolution.

the Line widths are being hardcoded now, on the cairo
version they weren't, this will need a bit of porting
too.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Merge branch 'PlotsV2' of https://github.com/tcanabrava/subsurface into Qt

Minor conflicts based on my cleanup of Tomaz' earlier commits.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Enabled some Render Hints for Antialiasing

Enabled some Render Hints for Antialiasing and
smooth transformations.

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