diff options
author | Robert C. Helling <helling@atdotde.de> | 2018-05-08 16:24:51 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-05-14 23:47:00 +0300 |
commit | 969dfee9ec088acb942e211cb90329d2b8c0751f (patch) | |
tree | 89571c94dde158e2027108ba3dde7c8468caf351 /qt-models | |
parent | 0b836f12fc714f0dfee6303699c9510f4cdf3b17 (diff) | |
download | subsurface-969dfee9ec088acb942e211cb90329d2b8c0751f.tar.gz |
Rename enum dive_comp_type to divemode_t
...as the usuage is not anymore about a computer but
a momentary dive mode. Rename the end indicator as well.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 10 | ||||
-rw-r--r-- | qt-models/yearlystatisticsmodel.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 8103d4d1b..c86526c1a 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -334,9 +334,9 @@ bool DivePlannerPointsModel::setData(const QModelIndex &index, const QVariant &v break; case DIVEMODE: if (value.toInt() < FREEDIVE) // FIXME: I want to be a combo box and translate strings to enum values - p.divemode = (enum dive_comp_type) value.toInt(); + p.divemode = (enum divemode_t) value.toInt(); if (index.row() == 0) - displayed_dive.dc.divemode = (enum dive_comp_type) value.toInt(); + displayed_dive.dc.divemode = (enum divemode_t) value.toInt(); break; } editStop(index.row(), p); @@ -466,10 +466,10 @@ void DivePlannerPointsModel::setGFLow(const int gflow) void DivePlannerPointsModel::setRebreatherMode(int mode) { int i; - displayed_dive.dc.divemode = (dive_comp_type) mode; + displayed_dive.dc.divemode = (divemode_t) mode; for (i=0; i < rowCount(); i++) { divepoints[i].setpoint = mode == CCR ? prefs.defaultsetpoint : 0; - divepoints[i].divemode = (enum dive_comp_type) mode; + divepoints[i].divemode = (enum divemode_t) mode; } emitDataChanged(); } @@ -673,7 +673,7 @@ int DivePlannerPointsModel::addStop(int milimeters, int seconds, int cylinderid_ { int cylinderid = 0; bool usePrevious = false; - enum dive_comp_type divemode = displayed_dive.dc.divemode; + enum divemode_t divemode = displayed_dive.dc.divemode; if (cylinderid_in >= 0) cylinderid = cylinderid_in; else diff --git a/qt-models/yearlystatisticsmodel.cpp b/qt-models/yearlystatisticsmodel.cpp index c1d75bc9a..a4a67aec7 100644 --- a/qt-models/yearlystatisticsmodel.cpp +++ b/qt-models/yearlystatisticsmodel.cpp @@ -205,7 +205,7 @@ void YearlyStatisticsModel::update_yearly_stats() /* Show the statistic sorted by dive type */ if (stats_by_type != NULL && stats_by_type[0].selection_size) { YearStatisticsItem *item = new YearStatisticsItem(stats_by_type[0]); - for (i = 1; i <= NUM_DC_TYPE; ++i) { + for (i = 1; i <= NUM_DIVEMODE; ++i) { if (stats_by_type[i].selection_size == 0) continue; YearStatisticsItem *iChild = new YearStatisticsItem(stats_by_type[i]); |