Passing the alignment as int instead of float or double was actually a bug
as CENTER is defined as (-0.5) ...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
a few code was moved around, a macro that contained
the form of x ? : y; had to be rewritten to x ? x : y
since c++ doesn't allow ternarys without the middle operator.
The color-choosing for the Cylinder Pressure broke
on the Qt port - but it's a small issue.
I'm painting everyone as 'dark green' now, will
fix that later.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Make the graphics_context part of the ProfileGraphicsView and remember
that the plot info is already a part of the graphics_context (we kept
passing around both of them in the Gtk code... pointless but a leftover
from before adding the pi to the gc...)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
There are subtle differences, the Cairo version looks
prettier - but that's fixable. I did a small triangle
and a exclamation mark on it. maybe a gradient would
make a good difference there.
this item has a ItemIgnoresTransformation tag, so
scalling, rotating or zooming will not change it's
size.
The tooltips are not yet ported.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The plot_text function from the cairo-methods are now ported
on the qt version. this patch moves around some code since
quite defines are already used and I didn't want to reinvent
the whell.
Original code used varargs, but I prefered to change it
, so now it receives just a reference to a QString object
and the string must be constructed before sending,
using the .arg methods.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The compiler on MacOSX wouldn't build Subsurface when bool
was redefined.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>