mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add the DiveCalculatedCeiling item.
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 commit is contained in:
parent
b1df7aeb4e
commit
8065374793
7 changed files with 56 additions and 3 deletions
|
|
@ -38,7 +38,8 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
|
|||
gasPressureItem(NULL),
|
||||
cartesianPlane(new DiveCartesianPlane()),
|
||||
meanDepth(new DiveLineItem()),
|
||||
diveComputerText(new DiveTextItem())
|
||||
diveComputerText(new DiveTextItem()),
|
||||
diveCeiling(NULL)
|
||||
{
|
||||
setScene(new QGraphicsScene());
|
||||
scene()->setSceneRect(0, 0, 100, 100);
|
||||
|
|
@ -358,6 +359,18 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
|
|||
gasPressureItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
|
||||
scene()->addItem(gasPressureItem);
|
||||
|
||||
if(diveCeiling){
|
||||
scene()->removeItem(diveCeiling);
|
||||
delete diveCeiling;
|
||||
}
|
||||
diveCeiling = new DiveCalculatedCeiling();
|
||||
diveCeiling->setHorizontalAxis(timeAxis);
|
||||
diveCeiling->setVerticalAxis(profileYAxis);
|
||||
diveCeiling->setModel(dataModel);
|
||||
diveCeiling->setVerticalDataColumn(DivePlotDataModel::CEILING);
|
||||
diveCeiling->setHorizontalDataColumn(DivePlotDataModel::TIME);
|
||||
scene()->addItem(diveCeiling);
|
||||
|
||||
diveComputerText->setText(currentdc->model);
|
||||
diveComputerText->animateMoveTo(1 , sceneRect().height());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue