comparison layer/TimeRulerLayer.cpp @ 587:4806715f7a19

Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author Chris Cannam
date Tue, 14 Jun 2011 15:27:05 +0100
parents f4960f8ce798
children 1a0dfcbffaf1
comparison
equal deleted inserted replaced
586:1ae54a29e59e 587:4806715f7a19
70 70
71 int left = RealTime::realTime2Frame(rdrt, rate); 71 int left = RealTime::realTime2Frame(rdrt, rate);
72 resolution = RealTime::realTime2Frame(rtick, rate); 72 resolution = RealTime::realTime2Frame(rtick, rate);
73 int right = left + resolution; 73 int right = left + resolution;
74 74
75 // DEBUG << "TimeRulerLayer::snapToFeatureFrame: type " 75 // SVDEBUG << "TimeRulerLayer::snapToFeatureFrame: type "
76 // << int(snap) << ", frame " << frame << " (time " 76 // << int(snap) << ", frame " << frame << " (time "
77 // << rt << ", tick " << rtick << ", rounded " << rdrt << ") "; 77 // << rt << ", tick " << rtick << ", rounded " << rdrt << ") ";
78 78
79 switch (snap) { 79 switch (snap) {
80 80
133 } 133 }
134 } 134 }
135 } 135 }
136 } 136 }
137 137
138 // DEBUG << " -> " << frame << " (resolution = " << resolution << ")" << endl; 138 // SVDEBUG << " -> " << frame << " (resolution = " << resolution << ")" << endl;
139 139
140 return true; 140 return true;
141 } 141 }
142 142
143 int 143 int
193 193
194 void 194 void
195 TimeRulerLayer::paint(View *v, QPainter &paint, QRect rect) const 195 TimeRulerLayer::paint(View *v, QPainter &paint, QRect rect) const
196 { 196 {
197 #ifdef DEBUG_TIME_RULER_LAYER 197 #ifdef DEBUG_TIME_RULER_LAYER
198 DEBUG << "TimeRulerLayer::paint (" << rect.x() << "," << rect.y() 198 SVDEBUG << "TimeRulerLayer::paint (" << rect.x() << "," << rect.y()
199 << ") [" << rect.width() << "x" << rect.height() << "]" << endl; 199 << ") [" << rect.width() << "x" << rect.height() << "]" << endl;
200 #endif 200 #endif
201 201
202 if (!m_model || !m_model->isOK()) return; 202 if (!m_model || !m_model->isOK()) return;
203 203
250 frame *= v->getZoomLevel(); // so frame corresponds to an exact pixel 250 frame *= v->getZoomLevel(); // so frame corresponds to an exact pixel
251 251
252 int x = v->getXForFrame(frame); 252 int x = v->getXForFrame(frame);
253 253
254 #ifdef DEBUG_TIME_RULER_LAYER 254 #ifdef DEBUG_TIME_RULER_LAYER
255 DEBUG << "Considering frame = " << frame << ", x = " << x << endl; 255 SVDEBUG << "Considering frame = " << frame << ", x = " << x << endl;
256 #endif 256 #endif
257 257
258 if (x >= rect.x() + rect.width() + 50) { 258 if (x >= rect.x() + rect.width() + 50) {
259 #ifdef DEBUG_TIME_RULER_LAYER 259 #ifdef DEBUG_TIME_RULER_LAYER
260 std::cerr << "X well out of range, ending here" << std::endl; 260 std::cerr << "X well out of range, ending here" << std::endl;