diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-12-30 20:27:39 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-30 16:12:15 -0800 |
commit | 2839aed8f282f409779f93fed2d899299f2a06d8 (patch) | |
tree | 7d341e5359a1a939e814f9e03c8043fd2ce4923f /qt-ui/profile | |
parent | d4d71bd6d3fc95ea23e1f668ff8310b17932c6ee (diff) | |
download | subsurface-2839aed8f282f409779f93fed2d899299f2a06d8.tar.gz |
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>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/diveplotdatamodel.cpp | 4 | ||||
-rw-r--r-- | qt-ui/profile/diveplotdatamodel.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp index 09ef76f9d..2e3f5228e 100644 --- a/qt-ui/profile/diveplotdatamodel.cpp +++ b/qt-ui/profile/diveplotdatamodel.cpp @@ -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); diff --git a/qt-ui/profile/diveplotdatamodel.h b/qt-ui/profile/diveplotdatamodel.h index 416ae6905..91e6a8b30 100644 --- a/qt-ui/profile/diveplotdatamodel.h +++ b/qt-ui/profile/diveplotdatamodel.h @@ -62,6 +62,7 @@ public: HEARTBEAT, AMBPRESSURE, GFLINE, + INSTANT_MEANDEPTH, COLUMNS }; explicit DivePlotDataModel(QObject *parent = 0); |