comparison layer/LayerFactory.cpp @ 156:b32282fefccd

* Tidy up inheritance hierarchy of model classes -- remove ZoomConstraint as a base class (make it a member instead) and remove virtual inheritances of QObject (no longer necessary).
author Chris Cannam
date Thu, 05 Oct 2006 11:03:06 +0000
parents 9e6b3e239b9d
children 57c2350a8c40
comparison
equal deleted inserted replaced
155:8c730f49b9b3 156:b32282fefccd
30 #include "data/model/SparseOneDimensionalModel.h" 30 #include "data/model/SparseOneDimensionalModel.h"
31 #include "data/model/SparseTimeValueModel.h" 31 #include "data/model/SparseTimeValueModel.h"
32 #include "data/model/NoteModel.h" 32 #include "data/model/NoteModel.h"
33 #include "data/model/TextModel.h" 33 #include "data/model/TextModel.h"
34 #include "data/model/DenseThreeDimensionalModel.h" 34 #include "data/model/DenseThreeDimensionalModel.h"
35 #include "data/model/WaveFileModel.h"
36 #include "data/model/WritableWaveFileModel.h"
35 37
36 LayerFactory * 38 LayerFactory *
37 LayerFactory::m_instance = new LayerFactory; 39 LayerFactory::m_instance = new LayerFactory;
38 40
39 LayerFactory * 41 LayerFactory *
198 } 200 }
199 201
200 void 202 void
201 LayerFactory::setModel(Layer *layer, Model *model) 203 LayerFactory::setModel(Layer *layer, Model *model)
202 { 204 {
203 if (trySetModel<WaveformLayer, RangeSummarisableTimeValueModel>(layer, model)) 205 // if (trySetModel<WaveformLayer, RangeSummarisableTimeValueModel>(layer, model))
206 // return;
207
208 if (trySetModel<WaveformLayer, WaveFileModel>(layer, model))
209 return;
210
211 if (trySetModel<WaveformLayer, WritableWaveFileModel>(layer, model))
204 return; 212 return;
205 213
206 if (trySetModel<SpectrogramLayer, DenseTimeValueModel>(layer, model)) 214 if (trySetModel<SpectrogramLayer, DenseTimeValueModel>(layer, model))
207 return; 215 return;
208 216