// Draw the cursors
if (view_.cursors_shown())
- view_.cursors()->draw_markers(p, r);
+ view_.cursors()->paint_label(p, r);
}
void CursorHeader::mouseMoveEvent(QMouseEvent *e)
right - left, height);
}
-void CursorPair::draw_markers(QPainter &p, const QRect &rect)
+void CursorPair::paint_label(QPainter &p, const QRect &rect)
{
assert(first_);
assert(second_);
public:
QRectF label_rect(const QRectF &rect) const;
- void draw_markers(QPainter &p, const QRect &rect);
+ void paint_label(QPainter &p, const QRect &rect);
void draw_viewport_background(QPainter &p, const QRect &rect);
virtual float get_x() const = 0;
+ /**
+ * Paints the marker's label to the ruler.
+ * @param p The painter to draw with.
+ * @param rect The rectangle of the ruler client area.
+ */
+ virtual void paint_label(QPainter &p, const QRect &rect) = 0;
+
protected:
View &view_;
};