summaryrefslogtreecommitdiffstats
path: root/profile.h
AgeCommit message (Collapse)Author
2013-10-07Minor include file unwindingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-09-27Added a ruler which can be dragged along the profileGravatar Maximilian Güntner
This patch adds a ruler QGraphicsItem which can be dragged along the profile. The ruler displays minimum, maximum and average for depth and speed (ascent/descent rate). Also, all used gas will be displayed. This also adds a new attribute to struct plot_data to store the speed (not just as velocity_t). Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2013-09-23Remove o2/he from plot_data and fix gas plot textGravatar Anton Lundin
plot_data.o2 and plot_data.he was wrong for all dives, due to that cylinderindex was set right first in populate_pressure_information, and thus those two contained bogus information. This makes the plot-text use cylinderindex-lookup as everything else. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-07-05Calculate deco stops, TTS and NDLGravatar Anton Lundin
Calculate TTS and NDL, and Deco stops when they don't already exist in the samle and show them in the mouse-over. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Show the gas with the pressure diagramGravatar Dirk Hohndel
This is a feature that had been requested a few times in the past and when debugging my "show only used gases" commit I realized that this would have been extremely useful to have... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Show ceilings for individual tissuesGravatar Robert Helling
I think that displaying tissue loadings either as pressure or as percentages is not very intuitive but that it makes much more sense when translated to ceiling depths. This change enables just that for the 16 tissues in our calculated ceiling and visualizes this in the profile graph. There is a checkbox in the preferences to turn this on. If enabled, all tissues having non-trivial ceilings are also shown in the info box. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-28Fix the positioning of text in the dive profileGravatar Dirk Hohndel
This had been bugging me for a while - the label texts were all not quite where I expected them to be. I think this looks much better now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-10Fix some compiler warningsGravatar Dirk Hohndel
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>
2013-05-09Plotting deco text.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-09Plotting temperature text.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-09Plot of the Cylinder Pressure over time.Gravatar Tomaz Canabrava
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>
2013-05-08Stop passing around gc and piGravatar Dirk Hohndel
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>
2013-05-08Plot the temperature GraphGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-06Plotting the Events doneGravatar Tomaz Canabrava
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>
2013-05-06Port the plot text method to Qt, also test it by actually plotting somethingGravatar Tomaz Canabrava
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>
2013-05-06Avoid redefinition of typedef ‘bool’Gravatar Henrik Brautaset Aronsen
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>
2013-05-04Plot of the Mean DephGravatar Tomaz Canabrava
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>
2013-05-04Start plotting something.Gravatar Tomaz Canabrava
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>
2013-05-04Moved the plot from the cairo version to the Qt versionGravatar Tomaz Canabrava
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>