diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-05-08 09:50:00 +0200 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2021-05-08 13:40:24 +0200 |
commit | a7002f4089e76efc0667d22fc10f44ada35ec1bd (patch) | |
tree | 2bc1254e09bb69619951dda3356c21c8cc90ce92 /profile-widget/diveprofileitem.cpp | |
parent | 8b0db14f64c4f1f3e3438b35fcfcd94994459283 (diff) | |
download | subsurface-a7002f4089e76efc0667d22fc10f44ada35ec1bd.tar.gz |
profile: remove DiveAmbPressureItem
This was replaced by the tissue map in 893bea700c98.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/diveprofileitem.cpp')
-rw-r--r-- | profile-widget/diveprofileitem.cpp | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp index 776fafcc9..621674b8f 100644 --- a/profile-widget/diveprofileitem.cpp +++ b/profile-widget/diveprofileitem.cpp @@ -308,47 +308,6 @@ void DivePercentageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem painter->restore(); } -DiveAmbPressureItem::DiveAmbPressureItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn) : - AbstractProfilePolygonItem(model, hAxis, hColumn, vAxis, vColumn) -{ - QPen pen; - pen.setBrush(QBrush(getColor(::AMB_PRESSURE_LINE))); - pen.setCosmetic(true); - pen.setWidth(2); - setPen(pen); -} - -void DiveAmbPressureItem::replot(const dive *, bool) -{ - int sec = 0; - - // Ignore empty values. a heart rate of 0 would be a bad sign. - QPolygonF poly; - for (int i = 0, modelDataCount = dataModel.rowCount(); i < modelDataCount; i++) { - int hr = dataModel.index(i, vDataColumn).data().toInt(); - if (!hr) - continue; - sec = dataModel.index(i, hDataColumn).data().toInt(); - QPointF point(hAxis.posAtValue(sec), vAxis.posAtValue(hr)); - poly.append(point); - } - setPolygon(poly); - - if (texts.count()) - texts.last()->setAlignment(Qt::AlignLeft | Qt::AlignBottom); -} - -void DiveAmbPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*) -{ - if (polygon().isEmpty()) - return; - painter->save(); - painter->setPen(pen()); - painter->drawPolyline(polygon()); - painter->restore(); - connect(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::percentagegraphChanged, this, &DiveAmbPressureItem::setVisible); -} - DiveTemperatureItem::DiveTemperatureItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn) : AbstractProfilePolygonItem(model, hAxis, hColumn, vAxis, vColumn) { @@ -466,7 +425,7 @@ void DiveMeanDepthItem::paint(QPainter *painter, const QStyleOptionGraphicsItem* painter->setPen(pen()); painter->drawPolyline(polygon()); painter->restore(); - connect(qPrefLog::instance(), &qPrefLog::show_average_depthChanged, this, &DiveAmbPressureItem::setVisible); + connect(qPrefLog::instance(), &qPrefLog::show_average_depthChanged, this, &DiveMeanDepthItem::setVisible); } void DiveMeanDepthItem::createTextItem() |