From: Joel Holdsworth Date: Mon, 2 Dec 2013 21:13:14 +0000 (+0000) Subject: Renamed get_samplerate to samplerate X-Git-Tag: pulseview-0.2.0~197 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9d28da5ae394e572dedf0ec22c17fd259825e1c9;p=pulseview.git Renamed get_samplerate to samplerate --- diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index f0bdd6bd..6d5e4e19 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -133,7 +133,7 @@ void DecoderStack::begin_decode() // Get the samplerate and start time _start_time = data->get_start_time(); - _samplerate = data->get_samplerate(); + _samplerate = data->samplerate(); if (_samplerate == 0.0) _samplerate = 1.0; diff --git a/pv/data/signaldata.cpp b/pv/data/signaldata.cpp index f7bfe1f0..04f1d3f5 100644 --- a/pv/data/signaldata.cpp +++ b/pv/data/signaldata.cpp @@ -29,7 +29,7 @@ SignalData::SignalData() : { } -double SignalData::get_samplerate() const +double SignalData::samplerate() const { return _samplerate; } diff --git a/pv/data/signaldata.h b/pv/data/signaldata.h index ba80ac3a..0aa3b348 100644 --- a/pv/data/signaldata.h +++ b/pv/data/signaldata.h @@ -32,7 +32,7 @@ public: SignalData(); public: - double get_samplerate() const; + double samplerate() const; void set_samplerate(double samplerate); double get_start_time() const; diff --git a/pv/view/analogsignal.cpp b/pv/view/analogsignal.cpp index bcd0f200..64633717 100644 --- a/pv/view/analogsignal.cpp +++ b/pv/view/analogsignal.cpp @@ -96,7 +96,7 @@ void AnalogSignal::paint_mid(QPainter &p, int left, int right) snapshots.front(); const double pixels_offset = offset / scale; - const double samplerate = _data->get_samplerate(); + const double samplerate = _data->samplerate(); const double start_time = _data->get_start_time(); const int64_t last_sample = snapshot->get_sample_count() - 1; const double samples_per_pixel = samplerate * scale; diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index 1d5a6268..1a629f2c 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -107,7 +107,7 @@ void DecodeTrace::paint_mid(QPainter &p, int left, int right) const double scale = _view->scale(); assert(scale > 0); - double samplerate = _decoder_stack->get_samplerate(); + double samplerate = _decoder_stack->samplerate(); // Show sample rate as 1Hz when it is unknown if (samplerate == 0.0) diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index 54faa601..ae4f11e2 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -126,7 +126,7 @@ void LogicSignal::paint_mid(QPainter &p, int left, int right) const shared_ptr &snapshot = snapshots.front(); - double samplerate = _data->get_samplerate(); + double samplerate = _data->samplerate(); // Show sample rate as 1Hz when it is unknown if (samplerate == 0.0) diff --git a/pv/view/view.cpp b/pv/view/view.cpp index abf522c0..cf93a371 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -177,7 +177,7 @@ void View::zoom_fit() const double start_time = d->get_start_time(); left_time = min(left_time, start_time); right_time = max(right_time, start_time + - d->get_max_sample_count() / d->get_samplerate()); + d->get_max_sample_count() / d->samplerate()); } assert(left_time < right_time); @@ -305,7 +305,7 @@ void View::get_scroll_layout(double &length, double &offset) const if (!sig_data) return; - length = _data_length / (sig_data->get_samplerate() * _scale); + length = _data_length / (sig_data->samplerate() * _scale); offset = _offset / _scale; }