Mercurial > hg > svgui
comparison view/Pane.cpp @ 765:410816717c2c tony_integration
Merge from tonioni branch
author | Chris Cannam |
---|---|
date | Wed, 07 May 2014 15:12:13 +0100 |
parents | 9cfcb2924ee3 30bc7b2155dc |
children | 488add397d34 4c8ca536b54f |
comparison
equal
deleted
inserted
replaced
757:2cd6d2d17437 | 765:410816717c2c |
---|---|
463 if (waveformModel && workModel && haveSomeTimeXAxis) break; | 463 if (waveformModel && workModel && haveSomeTimeXAxis) break; |
464 } | 464 } |
465 | 465 |
466 m_scaleWidth = 0; | 466 m_scaleWidth = 0; |
467 | 467 |
468 if (workModel) { | |
469 drawModelTimeExtents(r, paint, workModel); | |
470 } | |
471 | |
468 if (m_manager && m_manager->shouldShowVerticalScale() && topLayer) { | 472 if (m_manager && m_manager->shouldShowVerticalScale() && topLayer) { |
469 drawVerticalScale(r, topLayer, paint); | 473 drawVerticalScale(r, topLayer, paint); |
470 } | 474 } |
471 | 475 |
472 if (m_identifyFeatures && | 476 if (m_identifyFeatures && |
770 | 774 |
771 int x = width()/2 + 4; | 775 int x = width()/2 + 4; |
772 | 776 |
773 drawVisibleText(paint, x, y, text, OutlinedText); | 777 drawVisibleText(paint, x, y, text, OutlinedText); |
774 } | 778 } |
779 } | |
780 | |
781 void | |
782 Pane::drawModelTimeExtents(QRect r, QPainter &paint, const Model *model) | |
783 { | |
784 int x0 = getXForFrame(model->getStartFrame()); | |
785 int x1 = getXForFrame(model->getEndFrame()); | |
786 | |
787 int lw = 10; | |
788 | |
789 paint.save(); | |
790 | |
791 QBrush brush; | |
792 | |
793 if (hasLightBackground()) { | |
794 brush = QBrush(QColor("#f8f8f8")); | |
795 paint.setPen(Qt::black); | |
796 } else { | |
797 brush = QBrush(QColor("#101010")); | |
798 paint.setPen(Qt::white); | |
799 } | |
800 | |
801 if (x0 > r.x()) { | |
802 paint.fillRect(0, 0, x0, height(), brush); | |
803 paint.drawLine(x0, 0, x0, height()); | |
804 } | |
805 | |
806 if (x1 < r.x() + r.width()) { | |
807 paint.fillRect(x1, 0, width() - x1, height(), brush); | |
808 paint.drawLine(x1, 0, x1, height()); | |
809 } | |
810 | |
811 paint.restore(); | |
775 } | 812 } |
776 | 813 |
777 void | 814 void |
778 Pane::drawAlignmentStatus(QRect r, QPainter &paint, const Model *model, | 815 Pane::drawAlignmentStatus(QRect r, QPainter &paint, const Model *model, |
779 bool down) | 816 bool down) |