profile: remove PERCENTAGE_* data from DivePlotDataModel

The profile now reads these percentages directly from the
plot info structure.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-08-29 22:28:10 +02:00 committed by Dirk Hohndel
parent 505e4e47eb
commit 9e20cb5a49
2 changed files with 0 additions and 23 deletions

View file

@ -78,10 +78,6 @@ QVariant DivePlotDataModel::data(const QModelIndex &index, int role) const
return item.ceilings[index.column() - TISSUE_1];
}
if (role == Qt::DisplayRole && index.column() >= PERCENTAGE_1 && index.column() <= PERCENTAGE_16) {
return item.percentages[index.column() - PERCENTAGE_1];
}
if (role == Qt::BackgroundRole) {
switch (index.column()) {
case COLOR:
@ -152,9 +148,6 @@ QVariant DivePlotDataModel::headerData(int section, Qt::Orientation orientation,
if (role == Qt::DisplayRole && section >= TISSUE_1 && section <= TISSUE_16) {
return QString("Ceiling: %1").arg(section - TISSUE_1);
}
if (role == Qt::DisplayRole && section >= PERCENTAGE_1 && section <= PERCENTAGE_16) {
return QString("Tissue: %1").arg(section - PERCENTAGE_1);
}
return QVariant();
}

View file

@ -42,22 +42,6 @@ public:
TISSUE_14,
TISSUE_15,
TISSUE_16,
PERCENTAGE_1,
PERCENTAGE_2,
PERCENTAGE_3,
PERCENTAGE_4,
PERCENTAGE_5,
PERCENTAGE_6,
PERCENTAGE_7,
PERCENTAGE_8,
PERCENTAGE_9,
PERCENTAGE_10,
PERCENTAGE_11,
PERCENTAGE_12,
PERCENTAGE_13,
PERCENTAGE_14,
PERCENTAGE_15,
PERCENTAGE_16,
PN2,
PHE,
PO2,