DecodeTrace: Rename get_sample_range() to get_view_sample_range()
authorSoeren Apel <soeren@apelpie.net>
Thu, 13 Sep 2018 18:19:14 +0000 (20:19 +0200)
committerSoeren Apel <soeren@apelpie.net>
Thu, 13 Sep 2018 18:19:14 +0000 (20:19 +0200)
pv/views/trace/decodetrace.cpp
pv/views/trace/decodetrace.hpp

index 574e9d1ae96b8891689c402548182cceae2b869d..2797891138ffcd691b4c65ce241bb720547f2583 100644 (file)
@@ -173,7 +173,7 @@ void DecodeTrace::paint_mid(QPainter &p, ViewItemPaintParams &pp)
 
        // Iterate through the rows
        int y = get_visual_y();
 
        // Iterate through the rows
        int y = get_visual_y();
-       pair<uint64_t, uint64_t> sample_range = get_sample_range(pp.left(), pp.right());
+       pair<uint64_t, uint64_t> 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
 
        // 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<uint64_t, uint64_t> sample_range =
 
        // Default sample range is "from here"
        const pair<uint64_t, uint64_t> 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<uint64_t>::max());
 
        QMenu *const menu = new QMenu(parent);
        selected_sample_range_ = make_pair(sample_range.first, numeric_limits<uint64_t>::max());
 
        QMenu *const menu = new QMenu(parent);
@@ -719,7 +719,7 @@ pair<double, double> DecodeTrace::get_pixels_offset_samples_per_pixel() const
        return make_pair(pixels_offset, samplerate * scale);
 }
 
        return make_pair(pixels_offset, samplerate * scale);
 }
 
-pair<uint64_t, uint64_t> DecodeTrace::get_sample_range(
+pair<uint64_t, uint64_t> DecodeTrace::get_view_sample_range(
        int x_start, int x_end) const
 {
        double samples_per_pixel, pixels_offset;
        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<uint64_t, uint64_t> sample_range =
                return QString();
 
        const pair<uint64_t, uint64_t> 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();
        const int row = get_row_at_point(point);
        if (row < 0)
                return QString();
index 57e462203f1fc60ca9a8c01da58414185021e466..3d25c3e4d7410f10853204ba21116dc363610c40 100644 (file)
@@ -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.
         */
         * @return Returns a pair containing the start sample and the end
         *      sample that correspond to the start and end coordinates.
         */
-       pair<uint64_t, uint64_t> get_sample_range(int x_start, int x_end) const;
+       pair<uint64_t, uint64_t> 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;
 
        QColor get_row_color(int row_index) const;
        QColor get_annotation_color(QColor row_color, int annotation_index) const;