This item plots the DiveCalculatedCeiling over the profile. I still need
to add the Calc All Tissues version.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This just adds the texts for the gas profile. I've also added a method on
the dataModel() to return the diveId of the last used dive in a way that
the other methods can use it.
This code is almost 1-to-1 with the old one, a bit of thinkering can be
used to merge this loop with the upper one.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This fixes temperature text replacing the old code
with the new DiveTextItem.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I Moved the 'plot text' method of the Old Graphics to the new
layout - this one was mostly unchanged as it was already good
as is.
And used the TemperatureProfileItem to also display texts.
This was the first implementation of the new system that uses
*less* code than the original one, wich makes me happy.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added the Gas Pressure Graph with the related Model Changes
to access the cylinder index, pressure, interpolated pressure
and SAC.
The plot does not correctly plot its color right now but it's not hard to
do.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added missing information about the pressure to the model; this shows that
I didn't do something right, as the model has 0 pressure information. Need
to fix that on the next commit.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added the Temperature Graph with its related classes. A Temperature Axis
is also created so the item is plotted on the right place.
Currently the Temperature Axis is just like the depth axis - top is
zero, wich means that the graph is inverted.
Also, the Temperature axis is being displayed as this helps debugging.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The DiveProfileItem contained much of the complexity and
algorithms for almost all line-based items on the canvas,
so I transformed that to a general abstraction and implemented
a new DiveProfileItem that uses it. this should reduce a
bit of code since the implementation of the PP Graphs, Temperature
Cylinder Pressure and maybe a few others will only need to
reimplement the paint() and the modelDataChanged() methods.
The rest is ready.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I've used the paint() method on it ( even if it's not necessary
on a QGraphicsView ) to reduce absurdely the number of items that are
inserted on the QGraphicsScene ( each small line of the profile should
be an item if it was not for this, it's like that on the old profile. )
and thus reducing the memory consumption, speed and so on.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>