comparison data/model/RegionModel.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 8bf3a52a1604
children f97d64b8674f
comparison
equal deleted inserted replaced
1670:623231712470 1671:82d03c9661f9
105 bool haveDistinctValues() const { return m_haveDistinctValues; } 105 bool haveDistinctValues() const { return m_haveDistinctValues; }
106 106
107 float getValueMinimum() const { return m_valueMinimum; } 107 float getValueMinimum() const { return m_valueMinimum; }
108 float getValueMaximum() const { return m_valueMaximum; } 108 float getValueMaximum() const { return m_valueMaximum; }
109 109
110 int getCompletion() const { return m_completion; } 110 int getCompletion() const override { return m_completion; }
111 111
112 void setCompletion(int completion, bool update = true) { 112 void setCompletion(int completion, bool update = true) {
113 113
114 { QMutexLocker locker(&m_mutex); 114 { QMutexLocker locker(&m_mutex);
115 if (m_completion == completion) return; 115 if (m_completion == completion) return;