Mercurial > hg > svcore
comparison data/model/SparseTimeValueModel.h @ 1751:77543124651b by-id
Overhaul PlayParameters bits
author | Chris Cannam |
---|---|
date | Thu, 04 Jul 2019 18:04:21 +0100 |
parents | 52705a328b34 |
children | 6d09d68165a4 |
comparison
equal
deleted
inserted
replaced
1750:d0ef65d8dd89 | 1751:77543124651b |
---|---|
52 DeferredNotifier::NOTIFY_ALWAYS : | 52 DeferredNotifier::NOTIFY_ALWAYS : |
53 DeferredNotifier::NOTIFY_DEFERRED), | 53 DeferredNotifier::NOTIFY_DEFERRED), |
54 m_completion(100) { | 54 m_completion(100) { |
55 // Model is playable, but may not sound (if units not Hz or | 55 // Model is playable, but may not sound (if units not Hz or |
56 // range unsuitable) | 56 // range unsuitable) |
57 PlayParameterRepository::getInstance()->addPlayable(getId().untyped); | 57 PlayParameterRepository::getInstance()->addPlayable |
58 (getId().untyped, this); | |
58 } | 59 } |
59 | 60 |
60 SparseTimeValueModel(sv_samplerate_t sampleRate, int resolution, | 61 SparseTimeValueModel(sv_samplerate_t sampleRate, int resolution, |
61 float valueMinimum, float valueMaximum, | 62 float valueMinimum, float valueMaximum, |
62 bool notifyOnAdd = true) : | 63 bool notifyOnAdd = true) : |
71 DeferredNotifier::NOTIFY_ALWAYS : | 72 DeferredNotifier::NOTIFY_ALWAYS : |
72 DeferredNotifier::NOTIFY_DEFERRED), | 73 DeferredNotifier::NOTIFY_DEFERRED), |
73 m_completion(100) { | 74 m_completion(100) { |
74 // Model is playable, but may not sound (if units not Hz or | 75 // Model is playable, but may not sound (if units not Hz or |
75 // range unsuitable) | 76 // range unsuitable) |
76 PlayParameterRepository::getInstance()->addPlayable(getId().untyped); | 77 PlayParameterRepository::getInstance()->addPlayable |
78 (getId().untyped, this); | |
77 } | 79 } |
78 | 80 |
79 virtual ~SparseTimeValueModel() { | 81 virtual ~SparseTimeValueModel() { |
80 PlayParameterRepository::getInstance()->removePlayable(getId().untyped); | 82 PlayParameterRepository::getInstance()->removePlayable |
83 (getId().untyped); | |
81 } | 84 } |
82 | 85 |
83 QString getTypeName() const override { return tr("Sparse Time-Value"); } | 86 QString getTypeName() const override { return tr("Sparse Time-Value"); } |
84 bool isSparse() const override { return true; } | 87 bool isSparse() const override { return true; } |
85 bool isOK() const override { return true; } | 88 bool isOK() const override { return true; } |