Mercurial > hg > svgui
comparison layer/TimeInstantLayer.cpp @ 682:1a0dfcbffaf1
Drop std:: from cout, cerr, endl -- pull these in through Debug.h
author | Chris Cannam |
---|---|
date | Tue, 26 Nov 2013 14:06:40 +0000 |
parents | 3c29f7c1f079 |
children | 97ea68f62c1f 1d526ba11a24 |
comparison
equal
deleted
inserted
replaced
681:eaf4446a1bef | 682:1a0dfcbffaf1 |
---|---|
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 std::cerr << "TimeInstantLayer::setModel(" << model << ")" << std::endl; | 63 cerr << "TimeInstantLayer::setModel(" << model << ")" << 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 std::cerr << "TimeInstantLayer::drawStart(" << e->x() << ")" << std::endl; | 472 cerr << "TimeInstantLayer::drawStart(" << e->x() << ")" << 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 std::cerr << "TimeInstantLayer::drawDrag(" << e->x() << ")" << std::endl; | 495 cerr << "TimeInstantLayer::drawDrag(" << e->x() << ")" << 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 std::cerr << "TimeInstantLayer::drawEnd(" << e->x() << ")" << std::endl; | 512 cerr << "TimeInstantLayer::drawEnd(" << e->x() << ")" << 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 std::cerr << "TimeInstantLayer::editStart(" << e->x() << ")" << std::endl; | 573 cerr << "TimeInstantLayer::editStart(" << e->x() << ")" << 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 std::cerr << "TimeInstantLayer::editDrag(" << e->x() << ")" << std::endl; | 595 cerr << "TimeInstantLayer::editDrag(" << e->x() << ")" << 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 std::cerr << "TimeInstantLayer::editEnd(" << e->x() << ")" << std::endl; | 618 cerr << "TimeInstantLayer::editEnd(" << e->x() << ")" << 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, |