aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r--qt-ui/profile/profilewidget2.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index b76b4d351..46856ba76 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -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());