From: Soeren Apel Date: Thu, 13 Sep 2018 18:19:14 +0000 (+0200) Subject: DecodeTrace: Rename get_sample_range() to get_view_sample_range() X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=67fb15bfd6f26e45cfd4486d473fda688ae8b2de;p=pulseview.git DecodeTrace: Rename get_sample_range() to get_view_sample_range() --- diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp index 574e9d1a..27978911 100644 --- a/pv/views/trace/decodetrace.cpp +++ b/pv/views/trace/decodetrace.cpp @@ -173,7 +173,7 @@ void DecodeTrace::paint_mid(QPainter &p, ViewItemPaintParams &pp) // Iterate through the rows int y = get_visual_y(); - pair sample_range = get_sample_range(pp.left(), pp.right()); + pair sample_range = get_view_sample_range(pp.left(), pp.right()); // Just because the view says we see a certain sample range it // doesn't mean we have this many decoded samples, too, so crop @@ -336,7 +336,7 @@ QMenu* DecodeTrace::create_view_context_menu(QWidget *parent, QPoint &click_pos) // Default sample range is "from here" const pair sample_range = - get_sample_range(click_pos.x(), click_pos.x() + 1); + get_view_sample_range(click_pos.x(), click_pos.x() + 1); selected_sample_range_ = make_pair(sample_range.first, numeric_limits::max()); QMenu *const menu = new QMenu(parent); @@ -719,7 +719,7 @@ pair DecodeTrace::get_pixels_offset_samples_per_pixel() const return make_pair(pixels_offset, samplerate * scale); } -pair DecodeTrace::get_sample_range( +pair DecodeTrace::get_view_sample_range( int x_start, int x_end) const { double samples_per_pixel, pixels_offset; @@ -789,7 +789,7 @@ const QString DecodeTrace::get_annotation_at_point(const QPoint &point) return QString(); const pair sample_range = - get_sample_range(point.x(), point.x() + 1); + get_view_sample_range(point.x(), point.x() + 1); const int row = get_row_at_point(point); if (row < 0) return QString(); diff --git a/pv/views/trace/decodetrace.hpp b/pv/views/trace/decodetrace.hpp index 57e46220..3d25c3e4 100644 --- a/pv/views/trace/decodetrace.hpp +++ b/pv/views/trace/decodetrace.hpp @@ -159,7 +159,7 @@ private: * @return Returns a pair containing the start sample and the end * sample that correspond to the start and end coordinates. */ - pair get_sample_range(int x_start, int x_end) const; + pair get_view_sample_range(int x_start, int x_end) const; QColor get_row_color(int row_index) const; QColor get_annotation_color(QColor row_color, int annotation_index) const;