Mercurial > hg > svgui
diff 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 |
line wrap: on
line diff
--- a/layer/Layer.h Thu Jun 28 14:50:58 2007 +0000 +++ b/layer/Layer.h Fri Jun 29 13:58:08 2007 +0000 @@ -106,7 +106,11 @@ } virtual void paintCrosshairs(View *, QPainter &, QPoint) const { } - virtual void paintMeasurementRects(View *, QPainter &) const; + virtual void paintMeasurementRects(View *, QPainter &, + bool showFocus, QPoint focusPoint) const; + + virtual bool nearestMeasurementRectChanged(View *, QPoint prev, + QPoint now) const; virtual QString getFeatureDescription(View *, QPoint &) const { return ""; @@ -459,6 +463,14 @@ MeasureRectSet m_measureRects; MeasureRect m_draggingRect; bool m_haveDraggingRect; + + // Note that pixrects are only correct for a single view. + // So we should update them at the start of the paint procedure + // (painting is single threaded) and only use them after that. + void updateMeasurementPixrects(View *v) const; + + // This assumes updateMeasurementPixrects has been called + MeasureRectSet::const_iterator findFocusedMeasureRect(QPoint) const; void paintMeasurementRect(View *v, QPainter &paint, const MeasureRect &r, bool focus) const;