Mercurial > hg > svgui
comparison layer/Layer.h @ 272:87e4c880b4c8
* highlight the nearest measurement rect
* fix rewind during playback
author | Chris Cannam |
---|---|
date | Fri, 29 Jun 2007 13:58:08 +0000 |
parents | 61a704654497 |
children | e954c00cbe55 |
comparison
equal
deleted
inserted
replaced
271:1a49bd0d8375 | 272:87e4c880b4c8 |
---|---|
104 std::vector<QRect> &) const { | 104 std::vector<QRect> &) const { |
105 return false; | 105 return false; |
106 } | 106 } |
107 virtual void paintCrosshairs(View *, QPainter &, QPoint) const { } | 107 virtual void paintCrosshairs(View *, QPainter &, QPoint) const { } |
108 | 108 |
109 virtual void paintMeasurementRects(View *, QPainter &) const; | 109 virtual void paintMeasurementRects(View *, QPainter &, |
110 bool showFocus, QPoint focusPoint) const; | |
111 | |
112 virtual bool nearestMeasurementRectChanged(View *, QPoint prev, | |
113 QPoint now) const; | |
110 | 114 |
111 virtual QString getFeatureDescription(View *, QPoint &) const { | 115 virtual QString getFeatureDescription(View *, QPoint &) const { |
112 return ""; | 116 return ""; |
113 } | 117 } |
114 | 118 |
457 | 461 |
458 typedef std::set<MeasureRect> MeasureRectSet; | 462 typedef std::set<MeasureRect> MeasureRectSet; |
459 MeasureRectSet m_measureRects; | 463 MeasureRectSet m_measureRects; |
460 MeasureRect m_draggingRect; | 464 MeasureRect m_draggingRect; |
461 bool m_haveDraggingRect; | 465 bool m_haveDraggingRect; |
466 | |
467 // Note that pixrects are only correct for a single view. | |
468 // So we should update them at the start of the paint procedure | |
469 // (painting is single threaded) and only use them after that. | |
470 void updateMeasurementPixrects(View *v) const; | |
471 | |
472 // This assumes updateMeasurementPixrects has been called | |
473 MeasureRectSet::const_iterator findFocusedMeasureRect(QPoint) const; | |
462 | 474 |
463 void paintMeasurementRect(View *v, QPainter &paint, | 475 void paintMeasurementRect(View *v, QPainter &paint, |
464 const MeasureRect &r, bool focus) const; | 476 const MeasureRect &r, bool focus) const; |
465 | 477 |
466 private: | 478 private: |