X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fcursorpair.hpp;h=4361784a7a0a3d43e4e730add4217269bcb23b67;hp=43e06545ad4fd94cfe6690dc473906fa9fd3d910;hb=23e75650eba0491b2636de3cef87f893e38ae6f3;hpb=5165bb349b14802ca98766b4cecee3699d22fa55 diff --git a/pv/view/cursorpair.hpp b/pv/view/cursorpair.hpp index 43e06545..4361784a 100644 --- a/pv/view/cursorpair.hpp +++ b/pv/view/cursorpair.hpp @@ -36,6 +36,7 @@ class CursorPair : public TimeItem { private: static const int DeltaPadding; + static const QColor ViewportFillColour; public: /** @@ -67,18 +68,27 @@ public: float get_x() const; - QPoint point() const; + QPoint point(const QRect &rect) const; pv::widgets::Popup* create_popup(QWidget *parent); public: QRectF label_rect(const QRectF &rect) const; - void draw_markers(QPainter &p, const QRect &rect); - - void draw_viewport_background(QPainter &p, const QRect &rect); + /** + * Paints the marker's label to the ruler. + * @param p The painter to draw with. + * @param rect The rectangle of the ruler client area. + * @param hover true if the label is being hovered over by the mouse. + */ + void paint_label(QPainter &p, const QRect &rect, bool hover); - void draw_viewport_foreground(QPainter &p, const QRect &rect); + /** + * Paints the background layer of the item with a QPainter + * @param p the QPainter to paint into. + * @param pp the painting parameters object to paint with. + **/ + void paint_back(QPainter &p, const ViewItemPaintParams &pp); void compute_text_size(QPainter &p, unsigned int prefix);