Add Information about the Pressure to the Model.

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>
This commit is contained in:
Tomaz Canabrava 2014-01-17 11:07:52 -02:00 committed by Dirk Hohndel
parent e3ec5ef290
commit 0787347691
4 changed files with 8 additions and 2 deletions

View file

@ -31,6 +31,9 @@ QVariant DivePlotDataModel::data(const QModelIndex& index, int role) const
case TEMPERATURE: return item.temperature;
case COLOR: return item.velocity;
case USERENTERED: return false;
case CYLINDERINDEX: return item.cylinderindex;
case SENSOR_PRESSURE: return item.pressure[0];
case INTERPOLATED_PRESSURE: return item.pressure[1];
}
}
if (role == Qt::BackgroundRole) {
@ -61,6 +64,9 @@ QVariant DivePlotDataModel::headerData(int section, Qt::Orientation orientation,
case TEMPERATURE: return tr("Temperature");
case COLOR: return tr("Color");
case USERENTERED: return tr("User Entered");
case CYLINDERINDEX: return tr("Cylinder Index");
case SENSOR_PRESSURE: return tr("Sensor Pressure");
case INTERPOLATED_PRESSURE: return tr("Interpolated Pressure");
}
return QVariant();
}