Add the runnimg_sum data to the data model to be displayed on the profile

Without this nothing would be displayed.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-12-30 20:27:39 -02:00 committed by Dirk Hohndel
parent d4d71bd6d3
commit 2839aed8f2
2 changed files with 5 additions and 0 deletions

View file

@ -58,6 +58,8 @@ QVariant DivePlotDataModel::data(const QModelIndex &index, int role) const
return AMB_PERCENTAGE;
case GFLINE:
return item.gfline;
case INSTANT_MEANDEPTH:
return item.running_sum;
}
}
@ -131,6 +133,8 @@ QVariant DivePlotDataModel::headerData(int section, Qt::Orientation orientation,
return tr("Heart Beat");
case GFLINE:
return tr("Gradient Factor");
case INSTANT_MEANDEPTH:
return tr("Mean Depth/s");
}
if (role == Qt::DisplayRole && section >= TISSUE_1 && section <= TISSUE_16) {
return QString("Ceiling: %1").arg(section - TISSUE_1);

View file

@ -62,6 +62,7 @@ public:
HEARTBEAT,
AMBPRESSURE,
GFLINE,
INSTANT_MEANDEPTH,
COLUMNS
};
explicit DivePlotDataModel(QObject *parent = 0);