mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-07-23 18:44:19 -04:00
IMplement new spectrum flattening.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3642 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+17
-18
@@ -26,6 +26,9 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) :
|
||||
connect(ui->widePlot, SIGNAL(setFreq1(int,int)),this,
|
||||
SLOT(setFreq2(int,int)));
|
||||
|
||||
connect (ui->cbFlatten, SIGNAL(toggled(bool)),this,
|
||||
SLOT(on_cbFlatten_toggled(bool)));
|
||||
|
||||
//Restore user's settings
|
||||
m_settings->beginGroup("WideGraph");
|
||||
restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ());
|
||||
@@ -35,6 +38,8 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) :
|
||||
ui->gainSpinBox->setValue(ui->widePlot->getPlotGain());
|
||||
int n = m_settings->value("FreqSpan",2).toInt();
|
||||
int w = m_settings->value("PlotWidth",1000).toInt();
|
||||
m_bFlatten=m_settings->value("Flatten",true).toBool();
|
||||
ui->cbFlatten->setChecked(m_bFlatten);
|
||||
ui->widePlot->m_w=w;
|
||||
ui->freqSpanSpinBox->setValue(n);
|
||||
ui->widePlot->setNSpan(n);
|
||||
@@ -46,8 +51,6 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) :
|
||||
if(ui->widePlot->m_bCumulative) ui->spec2dComboBox->setCurrentIndex(1);
|
||||
int nbpp=m_settings->value("BinsPerPixel",2).toInt();
|
||||
ui->widePlot->setBinsPerPixel(nbpp);
|
||||
m_slope=m_settings->value("Slope",0.0).toDouble();
|
||||
ui->slopeSpinBox->setValue(m_slope);
|
||||
ui->widePlot->setStartFreq(m_settings->value("StartFreq",0).toInt());
|
||||
ui->fStartSpinBox->setValue(ui->widePlot->startFreq());
|
||||
m_waterfallPalette=m_settings->value("WaterfallPalette","Default").toString();
|
||||
@@ -95,10 +98,10 @@ void WideGraph::saveSettings()
|
||||
m_settings->setValue ("Current", ui->widePlot->m_bCurrent);
|
||||
m_settings->setValue ("Cumulative", ui->widePlot->m_bCumulative);
|
||||
m_settings->setValue ("BinsPerPixel", ui->widePlot->binsPerPixel ());
|
||||
m_settings->setValue ("Slope", m_slope);
|
||||
m_settings->setValue ("StartFreq", ui->widePlot->startFreq ());
|
||||
m_settings->setValue ("WaterfallPalette", m_waterfallPalette);
|
||||
m_settings->setValue ("Fmin", m_fMin);
|
||||
m_settings->setValue("Flatten",m_bFlatten);
|
||||
m_settings->endGroup ();
|
||||
}
|
||||
|
||||
@@ -288,26 +291,11 @@ void WideGraph::on_fMinSpinBox_valueChanged(int n)
|
||||
setRxRange(m_fMin);
|
||||
}
|
||||
|
||||
void WideGraph::on_slopeSpinBox_valueChanged(double d)
|
||||
{
|
||||
m_slope=d;
|
||||
}
|
||||
|
||||
void WideGraph::setSlope(double d)
|
||||
{
|
||||
m_slope=d;
|
||||
ui->slopeSpinBox->setValue(d);
|
||||
}
|
||||
|
||||
void WideGraph::setLockTxFreq(bool b)
|
||||
{
|
||||
m_lockTxFreq=b;
|
||||
ui->widePlot->m_lockTxFreq=b;
|
||||
}
|
||||
double WideGraph::getSlope()
|
||||
{
|
||||
return m_slope;
|
||||
}
|
||||
|
||||
void WideGraph::setFreq2(int rxFreq, int txFreq)
|
||||
{
|
||||
@@ -364,3 +352,14 @@ void WideGraph::on_paletteComboBox_activated(const QString &palette)
|
||||
m_waterfallPalette=palette;
|
||||
readPalette("Palettes/" + palette + ".pal");
|
||||
}
|
||||
|
||||
void WideGraph::on_cbFlatten_toggled(bool b)
|
||||
{
|
||||
m_bFlatten=b;
|
||||
|
||||
}
|
||||
|
||||
bool WideGraph::flatten()
|
||||
{
|
||||
return m_bFlatten;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user