Mercurial > hg > svcore
comparison data/model/RegionModel.h @ 1655:0cfb882155a6 single-point
Fixes: completion should default to 100 (it never gets set if we aren't a transform target); events added to time-value model should be denied durations; forward the overspill and matching search functions
author | Chris Cannam |
---|---|
date | Wed, 20 Mar 2019 11:14:36 +0000 |
parents | 7a56bb85030f |
children | e4084bc60fe8 |
comparison
equal
deleted
inserted
replaced
1654:26aa42fd60e9 | 1655:0cfb882155a6 |
---|---|
51 m_haveDistinctValues(false), | 51 m_haveDistinctValues(false), |
52 m_notifier(this, | 52 m_notifier(this, |
53 notifyOnAdd ? | 53 notifyOnAdd ? |
54 DeferredNotifier::NOTIFY_ALWAYS : | 54 DeferredNotifier::NOTIFY_ALWAYS : |
55 DeferredNotifier::NOTIFY_DEFERRED), | 55 DeferredNotifier::NOTIFY_DEFERRED), |
56 m_completion(0) { | 56 m_completion(100) { |
57 } | 57 } |
58 | 58 |
59 RegionModel(sv_samplerate_t sampleRate, int resolution, | 59 RegionModel(sv_samplerate_t sampleRate, int resolution, |
60 float valueMinimum, float valueMaximum, | 60 float valueMinimum, float valueMaximum, |
61 bool notifyOnAdd = true) : | 61 bool notifyOnAdd = true) : |
68 m_haveDistinctValues(false), | 68 m_haveDistinctValues(false), |
69 m_notifier(this, | 69 m_notifier(this, |
70 notifyOnAdd ? | 70 notifyOnAdd ? |
71 DeferredNotifier::NOTIFY_ALWAYS : | 71 DeferredNotifier::NOTIFY_ALWAYS : |
72 DeferredNotifier::NOTIFY_DEFERRED), | 72 DeferredNotifier::NOTIFY_DEFERRED), |
73 m_completion(0) { | 73 m_completion(100) { |
74 } | 74 } |
75 | 75 |
76 virtual ~RegionModel() { | 76 virtual ~RegionModel() { |
77 } | 77 } |
78 | 78 |
121 } | 121 } |
122 | 122 |
123 /** | 123 /** |
124 * Query methods. | 124 * Query methods. |
125 */ | 125 */ |
126 | |
127 int getEventCount() const { | 126 int getEventCount() const { |
128 return m_events.count(); | 127 return m_events.count(); |
129 } | 128 } |
130 bool isEmpty() const { | 129 bool isEmpty() const { |
131 return m_events.isEmpty(); | 130 return m_events.isEmpty(); |
157 bool allChange = false; | 156 bool allChange = false; |
158 | 157 |
159 { | 158 { |
160 QMutexLocker locker(&m_mutex); | 159 QMutexLocker locker(&m_mutex); |
161 m_events.add(e); | 160 m_events.add(e); |
162 //!!!??? if (point.getLabel() != "") m_hasTextLabels = true; | |
163 | 161 |
164 float v = e.getValue(); | 162 float v = e.getValue(); |
165 if (!ISNAN(v) && !ISINF(v)) { | 163 if (!ISNAN(v) && !ISINF(v)) { |
166 if (!m_haveExtents || v < m_valueMinimum) { | 164 if (!m_haveExtents || v < m_valueMinimum) { |
167 m_valueMinimum = v; allChange = true; | 165 m_valueMinimum = v; allChange = true; |