diff --git a/plotter.cpp b/plotter.cpp index 93be43f8..c5653640 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -714,8 +714,8 @@ CPlotter::resize() }; m_w = size().width(); - m_h2 = m_percent2DScreen * (size().height() - 30) / 100.0; - m_h1 = size().height() - m_h2; + m_h2 = m_percent2D * (size().height() - 30) / 100.0; + m_h1 = size().height() - m_h2; // We want our 3 main pixmaps sized to occupy our entire height, // and to be completely filled with an opaque color, since we're @@ -922,11 +922,11 @@ CPlotter::setFreq(int const freq) } void -CPlotter::setPercent2DScreen(int percent2DScreen) +CPlotter::setPercent2D(int percent2D) { - if (m_percent2DScreen != percent2DScreen) + if (m_percent2D != percent2D) { - m_percent2DScreen = percent2DScreen; + m_percent2D = percent2D; resize(); update(); } diff --git a/plotter.h b/plotter.h index 8ba9b1be..88da8cb4 100644 --- a/plotter.h +++ b/plotter.h @@ -127,16 +127,16 @@ public: // Inline accessors - int binsPerPixel() const { return m_binsPerPixel; } - int flatten() const { return m_flatten.live(); } - int freq() const { return m_freq; } - int percent2DScreen() const { return m_percent2DScreen; } - int plot2dGain() const { return m_scaler2D.gain(); } - int plot2dZero() const { return m_scaler2D.zero(); } - int plotGain() const { return m_scaler1D.gain(); } - int plotZero() const { return m_scaler1D.zero(); } - Spectrum spectrum() const { return m_spectrum; } - int startFreq() const { return m_startFreq; } + int binsPerPixel() const { return m_binsPerPixel; } + int flatten() const { return m_flatten.live(); } + int freq() const { return m_freq; } + int percent2D() const { return m_percent2D; } + int plot2dGain() const { return m_scaler2D.gain(); } + int plot2dZero() const { return m_scaler2D.zero(); } + int plotGain() const { return m_scaler1D.gain(); } + int plotZero() const { return m_scaler1D.zero(); } + Spectrum spectrum() const { return m_spectrum; } + int startFreq() const { return m_startFreq; } int frequencyAt(int const x) const @@ -164,7 +164,7 @@ public: void setFilterEnabled(bool); void setFilterOpacity(int); void setFreq(int); - void setPercent2DScreen(int); + void setPercent2D(int); void setPlotGain(int); void setPlotZero(int); void setStartFreq(int); @@ -216,22 +216,22 @@ private: // Data members ** ORDER DEPENDENCY ** - float m_dialFreq = 0.0f; - int m_nSubMode = 0; - int m_filterCenter = 0; - int m_filterWidth = 0; - int m_filterOpacity = 127; - int m_percent2DScreen = 0; - int m_binsPerPixel = 2; - int m_waterfallAvg = 1; - int m_lastMouseX = -1; - int m_line = std::numeric_limits::max(); - int m_startFreq = 0; - int m_freq = 0; - int m_w = 0; - int m_h1 = 0; - int m_h2 = 0; - bool m_filterEnabled = false; + float m_dialFreq = 0.0f; + int m_nSubMode = 0; + int m_filterCenter = 0; + int m_filterWidth = 0; + int m_filterOpacity = 127; + int m_percent2D = 0; + int m_binsPerPixel = 2; + int m_waterfallAvg = 1; + int m_lastMouseX = -1; + int m_line = std::numeric_limits::max(); + int m_startFreq = 0; + int m_freq = 0; + int m_w = 0; + int m_h1 = 0; + int m_h2 = 0; + bool m_filterEnabled = false; float m_freqPerPixel; RDP m_rdp; diff --git a/widegraph.cpp b/widegraph.cpp index 8e9dab74..c081bb3a 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -162,14 +162,14 @@ WideGraph::WideGraph(QSettings * settings, ui->widePlot->setPlot2dZero(m_settings->value("Plot2dZero", 0).toInt()); ui->widePlot->setFlatten(m_settings->value("Flatten", true).toBool()); ui->widePlot->setBinsPerPixel(m_settings->value("BinsPerPixel", 2).toInt()); - ui->widePlot->setPercent2DScreen(m_settings->value("Percent2D", 0).toInt()); + ui->widePlot->setPercent2D(m_settings->value("Percent2D", 0).toInt()); ui->zeroSlider->setValue(ui->widePlot->plotZero()); ui->gainSlider->setValue(ui->widePlot->plotGain()); ui->gain2dSlider->setValue(ui->widePlot->plot2dGain()); ui->zero2dSlider->setValue(ui->widePlot->plot2dZero()); ui->cbFlatten->setChecked(ui->widePlot->flatten()); ui->bppSpinBox->setValue(ui->widePlot->binsPerPixel()); - ui->sbPercent2dPlot->setValue(ui->widePlot->percent2DScreen()); + ui->sbPercent2dPlot->setValue(ui->widePlot->percent2D()); m_nsmo=m_settings->value("SmoothYellow",1).toInt(); ui->smoSpinBox->setValue(m_nsmo); m_waterfallAvg = m_settings->value("WaterfallAvg", 1).toInt(); @@ -284,7 +284,7 @@ void WideGraph::saveSettings() //saveS m_settings->setValue ("Plot2dGain", ui->widePlot->plot2dGain()); m_settings->setValue ("Plot2dZero", ui->widePlot->plot2dZero()); m_settings->setValue ("SmoothYellow", ui->smoSpinBox->value ()); - m_settings->setValue ("Percent2D", ui->widePlot->percent2DScreen()); + m_settings->setValue ("Percent2D", ui->widePlot->percent2D()); m_settings->setValue ("WaterfallAvg", ui->waterfallAvgSpinBox->value ()); m_settings->setValue ("WaterfallSpectrum", QVariant::fromValue(ui->widePlot->spectrum())); m_settings->setValue ("BinsPerPixel", ui->widePlot->binsPerPixel ()); @@ -853,7 +853,7 @@ WideGraph::smoothYellow() const void WideGraph::on_sbPercent2dPlot_valueChanged(int const n) { - ui->widePlot->setPercent2DScreen(n); + ui->widePlot->setPercent2D(n); } void