comparison data/model/SparseTimeValueModel.h @ 1671:82d03c9661f9 single-point

Rework isReady()/getCompletion() on models. Previously the new overhauled models were implementing getCompletion() but inheriting a version of isReady() (from the Model base) that didn't call it, referring only to isOK(). So they were reporting completion as soon as they had begun. Instead hoist getCompletion() to abstract base and call it from Model::isReady().
author Chris Cannam
date Wed, 27 Mar 2019 13:15:16 +0000
parents 353a2d15f213
children f97d64b8674f
comparison
equal deleted inserted replaced
1670:623231712470 1671:82d03c9661f9
109 bool hasTextLabels() const { return m_haveTextLabels; } 109 bool hasTextLabels() const { return m_haveTextLabels; }
110 110
111 float getValueMinimum() const { return m_valueMinimum; } 111 float getValueMinimum() const { return m_valueMinimum; }
112 float getValueMaximum() const { return m_valueMaximum; } 112 float getValueMaximum() const { return m_valueMaximum; }
113 113
114 int getCompletion() const { return m_completion; } 114 int getCompletion() const override { return m_completion; }
115 115
116 void setCompletion(int completion, bool update = true) { 116 void setCompletion(int completion, bool update = true) {
117 117
118 { QMutexLocker locker(&m_mutex); 118 { QMutexLocker locker(&m_mutex);
119 if (m_completion == completion) return; 119 if (m_completion == completion) return;