comparison layer/Layer.cpp @ 586:1ae54a29e59e

Merge from debug-output branch
author Chris Cannam
date Tue, 14 Jun 2011 14:48:29 +0100
parents f4960f8ce798
children 4806715f7a19
comparison
equal deleted inserted replaced
583:4c484636d5ec 586:1ae54a29e59e
40 { 40 {
41 } 41 }
42 42
43 Layer::~Layer() 43 Layer::~Layer()
44 { 44 {
45 // std::cerr << "Layer::~Layer(" << this << ")" << std::endl; 45 // DEBUG << "Layer::~Layer(" << this << ")" << endl;
46 } 46 }
47 47
48 void 48 void
49 Layer::connectSignals(const Model *model) 49 Layer::connectSignals(const Model *model)
50 { 50 {
104 } 104 }
105 105
106 PlayParameters * 106 PlayParameters *
107 Layer::getPlayParameters() 107 Layer::getPlayParameters()
108 { 108 {
109 // std::cerr << "Layer (" << this << ", " << objectName().toStdString() << ")::getPlayParameters: model is "<< getModel() << std::endl; 109 // std::cerr << "Layer (" << this << ", " << objectName() << ")::getPlayParameters: model is "<< getModel() << std::endl;
110 const Model *model = getModel(); 110 const Model *model = getModel();
111 if (model) { 111 if (model) {
112 return PlayParameterRepository::getInstance()->getPlayParameters(model); 112 return PlayParameterRepository::getInstance()->getPlayParameters(model);
113 } 113 }
114 return 0; 114 return 0;
167 167
168 size_t 168 size_t
169 Layer::alignToReference(View *v, size_t frame) const 169 Layer::alignToReference(View *v, size_t frame) const
170 { 170 {
171 const Model *m = getModel(); 171 const Model *m = getModel();
172 std::cerr << "Layer::alignToReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << std::endl; 172 DEBUG << "Layer::alignToReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << endl;
173 if (m && m->getAlignmentReference()) { 173 if (m && m->getAlignmentReference()) {
174 return m->alignToReference(frame); 174 return m->alignToReference(frame);
175 } else { 175 } else {
176 return v->alignToReference(frame); 176 return v->alignToReference(frame);
177 } 177 }
179 179
180 size_t 180 size_t
181 Layer::alignFromReference(View *v, size_t frame) const 181 Layer::alignFromReference(View *v, size_t frame) const
182 { 182 {
183 const Model *m = getModel(); 183 const Model *m = getModel();
184 std::cerr << "Layer::alignFromReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << std::endl; 184 DEBUG << "Layer::alignFromReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << endl;
185 if (m && m->getAlignmentReference()) { 185 if (m && m->getAlignmentReference()) {
186 return m->alignFromReference(frame); 186 return m->alignFromReference(frame);
187 } else { 187 } else {
188 return v->alignFromReference(frame); 188 return v->alignFromReference(frame);
189 } 189 }