Mercurial > hg > svcore
changeset 1770:dffc70996f54
Correct some erroneous signal signatures
author | Chris Cannam |
---|---|
date | Fri, 19 Jul 2019 16:10:00 +0100 |
parents | 9a8327e7b2dc |
children | 40420fa95ffe |
files | data/model/AggregateWaveModel.cpp data/model/AggregateWaveModel.h data/model/ModelDataTableModel.cpp data/model/ModelDataTableModel.h data/model/WritableWaveFileModel.cpp data/model/WritableWaveFileModel.h |
diffstat | 6 files changed, 44 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/data/model/AggregateWaveModel.cpp Thu Jul 18 14:42:24 2019 +0100 +++ b/data/model/AggregateWaveModel.cpp Fri Jul 19 16:10:00 2019 +0100 @@ -59,6 +59,13 @@ << "channels (has " << rate << ", expected " << overallRate << ")" << endl; } + + connect(model.get(), SIGNAL(modelChanged(ModelId)), + this, SLOT(componentModelChanged(ModelId))); + connect(model.get(), SIGNAL(modelChangedWithin(ModelId, sv_frame_t, sv_frame_t)), + this, SLOT(componentModelChangedWithin(ModelId, sv_frame_t, sv_frame_t))); + connect(model.get(), SIGNAL(completionChanged(ModelId)), + this, SLOT(componentModelCompletionChanged(ModelId))); } } @@ -228,21 +235,21 @@ } void -AggregateWaveModel::componentModelChanged() +AggregateWaveModel::componentModelChanged(ModelId) { - emit modelChanged(); + emit modelChanged(getId()); } void -AggregateWaveModel::componentModelChangedWithin(sv_frame_t start, sv_frame_t end) +AggregateWaveModel::componentModelChangedWithin(ModelId, sv_frame_t start, sv_frame_t end) { - emit modelChangedWithin(start, end); + emit modelChangedWithin(getId(), start, end); } void -AggregateWaveModel::componentModelCompletionChanged() +AggregateWaveModel::componentModelCompletionChanged(ModelId) { - emit completionChanged(); + emit completionChanged(getId()); } void
--- a/data/model/AggregateWaveModel.h Thu Jul 18 14:42:24 2019 +0100 +++ b/data/model/AggregateWaveModel.h Fri Jul 19 16:10:00 2019 +0100 @@ -79,15 +79,10 @@ QString indent = "", QString extraAttributes = "") const override; -signals: - void modelChanged(); - void modelChangedWithin(sv_frame_t, sv_frame_t); - void completionChanged(); - protected slots: - void componentModelChanged(); - void componentModelChangedWithin(sv_frame_t, sv_frame_t); - void componentModelCompletionChanged(); + void componentModelChanged(ModelId); + void componentModelChangedWithin(ModelId, sv_frame_t, sv_frame_t); + void componentModelCompletionChanged(ModelId); protected: ChannelSpecList m_components;
--- a/data/model/ModelDataTableModel.cpp Thu Jul 18 14:42:24 2019 +0100 +++ b/data/model/ModelDataTableModel.cpp Fri Jul 19 16:10:00 2019 +0100 @@ -30,9 +30,10 @@ { auto model = ModelById::get(m); if (model) { - connect(model.get(), SIGNAL(modelChanged()), this, SLOT(modelChanged())); - connect(model.get(), SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t)), - this, SLOT(modelChangedWithin(sv_frame_t, sv_frame_t))); + connect(model.get(), SIGNAL(modelChanged(ModelId)), + this, SLOT(modelChanged(ModelId))); + connect(model.get(), SIGNAL(modelChangedWithin(ModelId, sv_frame_t, sv_frame_t)), + this, SLOT(modelChangedWithin(ModelId, sv_frame_t, sv_frame_t))); } } @@ -216,7 +217,7 @@ } void -ModelDataTableModel::modelChanged() +ModelDataTableModel::modelChanged(ModelId) { SVDEBUG << "ModelDataTableModel::modelChanged" << endl; QModelIndex ix0; @@ -234,7 +235,7 @@ } void -ModelDataTableModel::modelChangedWithin(sv_frame_t f0, sv_frame_t f1) +ModelDataTableModel::modelChangedWithin(ModelId, sv_frame_t f0, sv_frame_t f1) { SVDEBUG << "ModelDataTableModel::modelChangedWithin(" << f0 << "," << f1 << ")" << endl; QModelIndex ix0 = getModelIndexForFrame(f0);
--- a/data/model/ModelDataTableModel.h Thu Jul 18 14:42:24 2019 +0100 +++ b/data/model/ModelDataTableModel.h Fri Jul 19 16:10:00 2019 +0100 @@ -73,8 +73,8 @@ void modelRemoved(); protected slots: - void modelChanged(); - void modelChangedWithin(sv_frame_t, sv_frame_t); + void modelChanged(ModelId); + void modelChangedWithin(ModelId, sv_frame_t, sv_frame_t); protected: std::shared_ptr<TabularModel> getTabularModel() const {
--- a/data/model/WritableWaveFileModel.cpp Thu Jul 18 14:42:24 2019 +0100 +++ b/data/model/WritableWaveFileModel.cpp Fri Jul 19 16:10:00 2019 +0100 @@ -158,9 +158,10 @@ } m_model->setStartFrame(m_startFrame); - connect(m_model, SIGNAL(modelChanged()), this, SIGNAL(modelChanged())); - connect(m_model, SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t)), - this, SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t))); + connect(m_model, SIGNAL(modelChanged(ModelId)), + this, SLOT(componentModelChanged(ModelId))); + connect(m_model, SIGNAL(modelChangedWithin(ModelId, sv_frame_t, sv_frame_t)), + this, SLOT(componentModelChangedWithin(ModelId, sv_frame_t, sv_frame_t))); PlayParameterRepository::getInstance()->addPlayable (getId().untyped, this); @@ -178,6 +179,18 @@ } void +WritableWaveFileModel::componentModelChanged(ModelId) +{ + emit modelChanged(getId()); +} + +void +WritableWaveFileModel::componentModelChangedWithin(ModelId, sv_frame_t f0, sv_frame_t f1) +{ + emit modelChangedWithin(getId(), f0, f1); +} + +void WritableWaveFileModel::setStartFrame(sv_frame_t startFrame) { m_startFrame = startFrame;
--- a/data/model/WritableWaveFileModel.h Thu Jul 18 14:42:24 2019 +0100 +++ b/data/model/WritableWaveFileModel.h Fri Jul 19 16:10:00 2019 +0100 @@ -198,6 +198,10 @@ signals: void writeCompleted(ModelId); + +protected slots: + void componentModelChanged(ModelId); + void componentModelChangedWithin(ModelId, sv_frame_t, sv_frame_t); protected: ReadOnlyWaveFileModel *m_model;