diff view/View.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 0946feb81b79 5b72899d692b
line wrap: on
line diff
--- a/view/View.cpp	Tue Jun 14 14:48:29 2011 +0100
+++ b/view/View.cpp	Tue Jun 14 15:27:05 2011 +0100
@@ -64,12 +64,12 @@
     m_manager(0),
     m_propertyContainer(new ViewPropertyContainer(this))
 {
-    DEBUG << "View::View(" << this << ")" << endl;
+    SVDEBUG << "View::View(" << this << ")" << endl;
 }
 
 View::~View()
 {
-//    DEBUG << "View::~View(" << this << ")" << endl;
+//    SVDEBUG << "View::~View(" << this << ")" << endl;
 
     m_deleting = true;
     delete m_propertyContainer;
@@ -274,7 +274,7 @@
 void
 View::toolModeChanged()
 {
-//    DEBUG << "View::toolModeChanged(" << m_manager->getToolMode() << ")" << endl;
+//    SVDEBUG << "View::toolModeChanged(" << m_manager->getToolMode() << ")" << endl;
 }
 
 void
@@ -359,7 +359,7 @@
     long frame = m_centreFrame - (width()/2) * z;
 
 #ifdef DEBUG_VIEW_WIDGET_PAINT
-    DEBUG << "View::getFrameForX(" << x << "): z = " << z << ", m_centreFrame = " << m_centreFrame << ", width() = " << width() << ", frame = " << frame << endl;
+    SVDEBUG << "View::getFrameForX(" << x << "): z = " << z << ", m_centreFrame = " << m_centreFrame << ", width() = " << width() << ", frame = " << frame << endl;
 #endif
 
     frame = (frame / z) * z; // this is start frame
@@ -688,13 +688,13 @@
 //    setCentreFrame(m_manager->getViewInitialCentreFrame());
 
     if (m_followPlay == PlaybackScrollPage) {
-//        DEBUG << "View::setViewManager: setting centre frame to global centre frame: " << m_manager->getGlobalCentreFrame() << endl;
+//        SVDEBUG << "View::setViewManager: setting centre frame to global centre frame: " << m_manager->getGlobalCentreFrame() << endl;
         setCentreFrame(m_manager->getGlobalCentreFrame(), false);
     } else if (m_followPlay == PlaybackScrollContinuous) {
-//        DEBUG << "View::setViewManager: setting centre frame to playback frame: " << m_manager->getPlaybackFrame() << endl;
+//        SVDEBUG << "View::setViewManager: setting centre frame to playback frame: " << m_manager->getPlaybackFrame() << endl;
         setCentreFrame(m_manager->getPlaybackFrame(), false);
     } else if (m_followPan) {
-//        DEBUG << "View::setViewManager: (follow pan) setting centre frame to global centre frame: " << m_manager->getGlobalCentreFrame() << endl;
+//        SVDEBUG << "View::setViewManager: (follow pan) setting centre frame to global centre frame: " << m_manager->getGlobalCentreFrame() << endl;
         setCentreFrame(m_manager->getGlobalCentreFrame(), false);
     }
 
@@ -897,7 +897,7 @@
     Layer *layer = dynamic_cast<Layer *>(sender());
 
 #ifdef DEBUG_VIEW_WIDGET_PAINT
-    DEBUG << "View::layerParametersChanged()" << endl;
+    SVDEBUG << "View::layerParametersChanged()" << endl;
 #endif
 
     delete m_cache;
@@ -1271,10 +1271,10 @@
     bool metUnscrollable = false;
 
     for (LayerList::const_iterator i = m_layers.begin(); i != m_layers.end(); ++i) {
-//        DEBUG << "View::getScrollableBackLayers: calling isLayerDormant on layer " << *i << endl;
+//        SVDEBUG << "View::getScrollableBackLayers: calling isLayerDormant on layer " << *i << endl;
 //        std::cerr << "(name is " << (*i)->objectName() << ")"
 //                  << std::endl;
-//        DEBUG << "View::getScrollableBackLayers: I am " << this << endl;
+//        SVDEBUG << "View::getScrollableBackLayers: I am " << this << endl;
 	if ((*i)->isLayerDormant(this)) continue;
 	if ((*i)->isLayerOpaque()) {
 	    // You can't see anything behind an opaque layer!
@@ -1459,7 +1459,7 @@
                     (wfm = dynamic_cast<RangeSummarisableTimeValueModel *>
                      (model->getSourceModel()))) {
                     completion = wfm->getAlignmentCompletion();
-//                    DEBUG << "View::checkProgress: Alignment completion = " << completion << endl;
+//                    SVDEBUG << "View::checkProgress: Alignment completion = " << completion << endl;
                     if (completion < 100) {
                         text = tr("Alignment");
                     }
@@ -1544,7 +1544,7 @@
 View::paintEvent(QPaintEvent *e)
 {
 //    Profiler prof("View::paintEvent", false);
-//    DEBUG << "View::paintEvent: centre frame is " << m_centreFrame << endl;
+//    SVDEBUG << "View::paintEvent: centre frame is " << m_centreFrame << endl;
 
     if (m_layers.empty()) {
 	QFrame::paintEvent(e);
@@ -1876,7 +1876,7 @@
 	if (p1 < 0 || p0 > width()) continue;
 
 #ifdef DEBUG_VIEW_WIDGET_PAINT
-	DEBUG << "View::drawSelections: " << p0 << ",-1 [" << (p1-p0) << "x" << (height()+1) << "]" << endl;
+	SVDEBUG << "View::drawSelections: " << p0 << ",-1 [" << (p1-p0) << "x" << (height()+1) << "]" << endl;
 #endif
 
 	bool illuminateThis =
@@ -1978,7 +1978,7 @@
 View::drawMeasurementRect(QPainter &paint, const Layer *topLayer, QRect r,
                           bool focus) const
 {
-//    DEBUG << "View::drawMeasurementRect(" << r.x() << "," << r.y() << " "
+//    SVDEBUG << "View::drawMeasurementRect(" << r.x() << "," << r.y() << " "
 //              << r.width() << "x" << r.height() << ")" << endl;
 
     if (r.x() + r.width() < 0 || r.x() >= width()) return;