mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: remove DiveGFLineItem
This was replaced by the tissue map in 893bea700c
.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
fd3ebf9b62
commit
8b0db14f64
6 changed files with 0 additions and 60 deletions
|
@ -349,47 +349,6 @@ void DiveAmbPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
|
|||
connect(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::percentagegraphChanged, this, &DiveAmbPressureItem::setVisible);
|
||||
}
|
||||
|
||||
DiveGFLineItem::DiveGFLineItem(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(::GF_LINE)));
|
||||
pen.setCosmetic(true);
|
||||
pen.setWidth(2);
|
||||
setPen(pen);
|
||||
}
|
||||
|
||||
void DiveGFLineItem::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 DiveGFLineItem::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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue