comparison layer/Layer.cpp @ 1489:b402121d8f5f

Add direct method to get source model
author Chris Cannam
date Fri, 02 Aug 2019 16:42:32 +0100
parents e540aa5d89cd
children 4f8c72adbf43
comparison
equal deleted inserted replaced
1488:bd7fdc418f36 1489:b402121d8f5f
60 connect(model.get(), SIGNAL(completionChanged(ModelId)), 60 connect(model.get(), SIGNAL(completionChanged(ModelId)),
61 this, SIGNAL(modelCompletionChanged(ModelId))); 61 this, SIGNAL(modelCompletionChanged(ModelId)));
62 62
63 connect(model.get(), SIGNAL(alignmentCompletionChanged(ModelId)), 63 connect(model.get(), SIGNAL(alignmentCompletionChanged(ModelId)),
64 this, SIGNAL(modelAlignmentCompletionChanged(ModelId))); 64 this, SIGNAL(modelAlignmentCompletionChanged(ModelId)));
65 }
66
67 ModelId
68 Layer::getSourceModel() const
69 {
70 ModelId sourceId;
71 auto model = ModelById::get(getModel());
72 while (model && !model->getSourceModel().isNone()) {
73 sourceId = model->getSourceModel();
74 model = ModelById::get(sourceId);
75 }
76 return sourceId;
65 } 77 }
66 78
67 QString 79 QString
68 Layer::getPropertyContainerIconName() const 80 Layer::getPropertyContainerIconName() const
69 { 81 {