mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-12-23 19:25:37 -05:00
Offer cumulative as well as current 2-d plot.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2656 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
5e459fe07a
commit
2f363be577
@ -1,4 +1,4 @@
|
||||
//---------------------------------------------------------------- MainWindow
|
||||
//----------------------------------------------------------------- MainWindow
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "devsetup.h"
|
||||
|
@ -125,6 +125,7 @@ void CPlotter::draw(float swide[], int i0) //draw()
|
||||
painter1.setPen(m_ColorTbl[y1]);
|
||||
painter1.drawPoint(i,0);
|
||||
int y2 = 0.7*gain*(y + 54 - m_plotZero);
|
||||
if(!m_bCurrent) y2=10.0*jt9com_.savg[i];
|
||||
if (y2<0) y2=0;
|
||||
if (y2>254) y2=254;
|
||||
if (swide[i]>1.e29) y2=255;
|
||||
|
@ -26,6 +26,7 @@ public:
|
||||
QSize minimumSizeHint() const;
|
||||
QSize sizeHint() const;
|
||||
QColor m_ColorTbl[256];
|
||||
bool m_bCurrent;
|
||||
int m_plotZero;
|
||||
int m_plotGain;
|
||||
float m_fSpan;
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "widegraph.h"
|
||||
#include "ui_widegraph.h"
|
||||
#include "commons.h"
|
||||
|
||||
#define NSMAX 22000
|
||||
|
||||
@ -14,6 +15,7 @@ WideGraph::WideGraph(QWidget *parent) :
|
||||
this->setMaximumWidth(2048);
|
||||
this->setMaximumHeight(880);
|
||||
ui->widePlot->setMaximumHeight(800);
|
||||
ui->widePlot->m_bCurrent=false;
|
||||
|
||||
connect(ui->widePlot, SIGNAL(freezeDecode1(int)),this,
|
||||
SLOT(wideFreezeDecode(int)));
|
||||
@ -38,6 +40,9 @@ WideGraph::WideGraph(QWidget *parent) :
|
||||
ui->waterfallAvgSpinBox->setValue(m_waterfallAvg);
|
||||
m_dialFreq=settings.value("DialFreqMHz",473.000).toDouble();
|
||||
ui->fDialLineEdit->setText(QString::number(m_dialFreq));
|
||||
ui->widePlot->m_bCurrent=settings.value("Current",true).toBool();
|
||||
ui->rbCurrent->setChecked(ui->widePlot->m_bCurrent);
|
||||
ui->rbCumulative->setChecked(!ui->widePlot->m_bCurrent);
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
@ -62,6 +67,7 @@ void WideGraph::saveSettings()
|
||||
settings.setValue("FreqSpan",ui->freqSpanSpinBox->value());
|
||||
settings.setValue("WaterfallAvg",ui->waterfallAvgSpinBox->value());
|
||||
settings.setValue("DialFreqMHz",m_dialFreq);
|
||||
settings.setValue("Current",ui->widePlot->m_bCurrent);
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
@ -256,3 +262,13 @@ void WideGraph::setPeriod(int ntrperiod, int nsps)
|
||||
m_nsps=nsps;
|
||||
ui->widePlot->setNsps(nsps);
|
||||
}
|
||||
|
||||
void WideGraph::on_rbCurrent_toggled(bool checked)
|
||||
{
|
||||
ui->widePlot->m_bCurrent=checked;
|
||||
}
|
||||
|
||||
void WideGraph::on_rbCumulative_toggled(bool checked)
|
||||
{
|
||||
ui->widePlot->m_bCurrent=!checked;
|
||||
}
|
||||
|
@ -54,6 +54,10 @@ private slots:
|
||||
void on_autoZeroPushButton_clicked();
|
||||
void on_fDialLineEdit_editingFinished();
|
||||
|
||||
void on_rbCurrent_toggled(bool checked);
|
||||
|
||||
void on_rbCumulative_toggled(bool checked);
|
||||
|
||||
private:
|
||||
qint32 m_waterfallAvg;
|
||||
qint32 m_fCal;
|
||||
|
33
widegraph.ui
33
widegraph.ui
@ -258,6 +258,39 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbCurrent">
|
||||
<property name="text">
|
||||
<string>Current</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbCumulative">
|
||||
<property name="text">
|
||||
<string>Cumulative</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
|
Loading…
Reference in New Issue
Block a user