comparison layer/TimeInstantLayer.cpp @ 601:3c29f7c1f079

Minor debug change
author Chris Cannam
date Mon, 17 Oct 2011 11:57:37 +0100
parents 4806715f7a19
children 3437e0fad7ae 1a0dfcbffaf1
comparison
equal deleted inserted replaced
599:485b12e3505e 601:3c29f7c1f079
58 m_model = model; 58 m_model = model;
59 59
60 connectSignals(m_model); 60 connectSignals(m_model);
61 61
62 #ifdef DEBUG_TIME_INSTANT_LAYER 62 #ifdef DEBUG_TIME_INSTANT_LAYER
63 SVDEBUG << "TimeInstantLayer::setModel(" << model << ")" << endl; 63 std::cerr << "TimeInstantLayer::setModel(" << model << ")" << std::endl;
64 #endif 64 #endif
65 65
66 if (m_model && m_model->getRDFTypeURI().endsWith("Segment")) { 66 if (m_model && m_model->getRDFTypeURI().endsWith("Segment")) {
67 setPlotStyle(PlotSegmentation); 67 setPlotStyle(PlotSegmentation);
68 } 68 }
467 467
468 void 468 void
469 TimeInstantLayer::drawStart(View *v, QMouseEvent *e) 469 TimeInstantLayer::drawStart(View *v, QMouseEvent *e)
470 { 470 {
471 #ifdef DEBUG_TIME_INSTANT_LAYER 471 #ifdef DEBUG_TIME_INSTANT_LAYER
472 SVDEBUG << "TimeInstantLayer::drawStart(" << e->x() << ")" << endl; 472 std::cerr << "TimeInstantLayer::drawStart(" << e->x() << ")" << std::endl;
473 #endif 473 #endif
474 474
475 if (!m_model) return; 475 if (!m_model) return;
476 476
477 long frame = v->getFrameForX(e->x()); 477 long frame = v->getFrameForX(e->x());
490 490
491 void 491 void
492 TimeInstantLayer::drawDrag(View *v, QMouseEvent *e) 492 TimeInstantLayer::drawDrag(View *v, QMouseEvent *e)
493 { 493 {
494 #ifdef DEBUG_TIME_INSTANT_LAYER 494 #ifdef DEBUG_TIME_INSTANT_LAYER
495 SVDEBUG << "TimeInstantLayer::drawDrag(" << e->x() << ")" << endl; 495 std::cerr << "TimeInstantLayer::drawDrag(" << e->x() << ")" << std::endl;
496 #endif 496 #endif
497 497
498 if (!m_model || !m_editing) return; 498 if (!m_model || !m_editing) return;
499 499
500 long frame = v->getFrameForX(e->x()); 500 long frame = v->getFrameForX(e->x());
507 507
508 void 508 void
509 TimeInstantLayer::drawEnd(View *, QMouseEvent *e) 509 TimeInstantLayer::drawEnd(View *, QMouseEvent *e)
510 { 510 {
511 #ifdef DEBUG_TIME_INSTANT_LAYER 511 #ifdef DEBUG_TIME_INSTANT_LAYER
512 SVDEBUG << "TimeInstantLayer::drawEnd(" << e->x() << ")" << endl; 512 std::cerr << "TimeInstantLayer::drawEnd(" << e->x() << ")" << std::endl;
513 #endif 513 #endif
514 if (!m_model || !m_editing) return; 514 if (!m_model || !m_editing) return;
515 QString newName = tr("Add Point at %1 s") 515 QString newName = tr("Add Point at %1 s")
516 .arg(RealTime::frame2RealTime(m_editingPoint.frame, 516 .arg(RealTime::frame2RealTime(m_editingPoint.frame,
517 m_model->getSampleRate()) 517 m_model->getSampleRate())
568 568
569 void 569 void
570 TimeInstantLayer::editStart(View *v, QMouseEvent *e) 570 TimeInstantLayer::editStart(View *v, QMouseEvent *e)
571 { 571 {
572 #ifdef DEBUG_TIME_INSTANT_LAYER 572 #ifdef DEBUG_TIME_INSTANT_LAYER
573 SVDEBUG << "TimeInstantLayer::editStart(" << e->x() << ")" << endl; 573 std::cerr << "TimeInstantLayer::editStart(" << e->x() << ")" << std::endl;
574 #endif 574 #endif
575 575
576 if (!m_model) return; 576 if (!m_model) return;
577 577
578 SparseOneDimensionalModel::PointList points = getLocalPoints(v, e->x()); 578 SparseOneDimensionalModel::PointList points = getLocalPoints(v, e->x());
590 590
591 void 591 void
592 TimeInstantLayer::editDrag(View *v, QMouseEvent *e) 592 TimeInstantLayer::editDrag(View *v, QMouseEvent *e)
593 { 593 {
594 #ifdef DEBUG_TIME_INSTANT_LAYER 594 #ifdef DEBUG_TIME_INSTANT_LAYER
595 SVDEBUG << "TimeInstantLayer::editDrag(" << e->x() << ")" << endl; 595 std::cerr << "TimeInstantLayer::editDrag(" << e->x() << ")" << std::endl;
596 #endif 596 #endif
597 597
598 if (!m_model || !m_editing) return; 598 if (!m_model || !m_editing) return;
599 599
600 long frame = v->getFrameForX(e->x()); 600 long frame = v->getFrameForX(e->x());
613 613
614 void 614 void
615 TimeInstantLayer::editEnd(View *, QMouseEvent *e) 615 TimeInstantLayer::editEnd(View *, QMouseEvent *e)
616 { 616 {
617 #ifdef DEBUG_TIME_INSTANT_LAYER 617 #ifdef DEBUG_TIME_INSTANT_LAYER
618 SVDEBUG << "TimeInstantLayer::editEnd(" << e->x() << ")" << endl; 618 std::cerr << "TimeInstantLayer::editEnd(" << e->x() << ")" << std::endl;
619 #endif 619 #endif
620 if (!m_model || !m_editing) return; 620 if (!m_model || !m_editing) return;
621 if (m_editingCommand) { 621 if (m_editingCommand) {
622 QString newName = tr("Move Point to %1 s") 622 QString newName = tr("Move Point to %1 s")
623 .arg(RealTime::frame2RealTime(m_editingPoint.frame, 623 .arg(RealTime::frame2RealTime(m_editingPoint.frame,