X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Ftrace.cpp;h=ff1fbddbcb5305185ec1abba301cc5e3857b7c19;hb=fe08b6e8a85c80ae738757f7d85aa38ef7c4bdc3;hp=6c43c4c2238044c572fbe0edc4e7343449c06ba7;hpb=9472f4476b27336e9187635015169e308bfe8af7;p=pulseview.git diff --git a/pv/view/trace.cpp b/pv/view/trace.cpp index 6c43c4c2..ff1fbddb 100644 --- a/pv/view/trace.cpp +++ b/pv/view/trace.cpp @@ -29,6 +29,7 @@ namespace pv { namespace view { +const QPen Trace::AxisPen(QColor(128, 128, 128, 64)); const int Trace::LabelHitPadding = 2; Trace::Trace(pv::SigSession &session, QString name) : @@ -74,6 +75,27 @@ void Trace::set_view(pv::view::View *view) _view = view; } +void Trace::paint_back(QPainter &p, int left, int right) +{ + (void)p; + (void)left; + (void)right; +} + +void Trace::paint_mid(QPainter &p, int left, int right) +{ + (void)p; + (void)left; + (void)right; +} + +void Trace::paint_fore(QPainter &p, int left, int right) +{ + (void)p; + (void)left; + (void)right; +} + void Trace::paint_label(QPainter &p, int right, bool hover) { assert(_view); @@ -141,6 +163,17 @@ bool Trace::pt_in_label_rect(int left, int right, const QPoint &point) ).contains(point); } +int Trace::get_y() const +{ + return _v_offset - _view->v_offset(); +} + +void Trace::paint_axis(QPainter &p, int y, int left, int right) +{ + p.setPen(AxisPen); + p.drawLine(QPointF(left, y + 0.5f), QPointF(right, y + 0.5f)); +} + void Trace::compute_text_size(QPainter &p) { _text_size = QSize(