From 9e20cb5a4911b5132983365f2f3433f281178601 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 29 Aug 2021 22:28:10 +0200 Subject: [PATCH] profile: remove PERCENTAGE_* data from DivePlotDataModel The profile now reads these percentages directly from the plot info structure. Signed-off-by: Berthold Stoeger --- qt-models/diveplotdatamodel.cpp | 7 ------- qt-models/diveplotdatamodel.h | 16 ---------------- 2 files changed, 23 deletions(-) diff --git a/qt-models/diveplotdatamodel.cpp b/qt-models/diveplotdatamodel.cpp index ea92a490d..92585f35c 100644 --- a/qt-models/diveplotdatamodel.cpp +++ b/qt-models/diveplotdatamodel.cpp @@ -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(); } diff --git a/qt-models/diveplotdatamodel.h b/qt-models/diveplotdatamodel.h index f2222c84c..00bf7bcfa 100644 --- a/qt-models/diveplotdatamodel.h +++ b/qt-models/diveplotdatamodel.h @@ -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,