mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-30 05:12:26 -04:00
Minor tweaks to widegraph and plotter, for ease of use.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8421 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
6d80c657ac
commit
dfed81d618
@ -170,7 +170,7 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
|
|||||||
if (swide[i]<1.e29) painter1.setPen(g_ColorTbl[y1]);
|
if (swide[i]<1.e29) painter1.setPen(g_ColorTbl[y1]);
|
||||||
painter1.drawPoint(i,m_j);
|
painter1.drawPoint(i,m_j);
|
||||||
}
|
}
|
||||||
if(m_bReplot) return;
|
// if(m_bReplot) return;
|
||||||
|
|
||||||
m_line++;
|
m_line++;
|
||||||
|
|
||||||
@ -222,6 +222,7 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
|
|||||||
if(y2>y2max) y2max=y2;
|
if(y2>y2max) y2max=y2;
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
if(m_bReplot) return;
|
||||||
|
|
||||||
if(swide[0]>1.0e29) m_line=0;
|
if(swide[0]>1.0e29) m_line=0;
|
||||||
if(m_line == painter1.fontMetrics ().height ()) {
|
if(m_line == painter1.fontMetrics ().height ()) {
|
||||||
@ -295,14 +296,14 @@ void CPlotter::drawRed(int ia, int ib, float swide[])
|
|||||||
void CPlotter::replot()
|
void CPlotter::replot()
|
||||||
{
|
{
|
||||||
float swide[m_w];
|
float swide[m_w];
|
||||||
|
m_bReplot=true;
|
||||||
for(int irow=0; irow<m_h1; irow++) {
|
for(int irow=0; irow<m_h1; irow++) {
|
||||||
m_j=irow;
|
m_j=irow;
|
||||||
plotsave_(swide,&m_w,&m_h1,&irow);
|
plotsave_(swide,&m_w,&m_h1,&irow);
|
||||||
m_bReplot=true;
|
|
||||||
draw(swide,false,false);
|
draw(swide,false,false);
|
||||||
m_bReplot=false;
|
|
||||||
update(); //trigger a new paintEvent
|
|
||||||
}
|
}
|
||||||
|
update(); //trigger a new paintEvent
|
||||||
|
m_bReplot=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlotter::DrawOverlay() //DrawOverlay()
|
void CPlotter::DrawOverlay() //DrawOverlay()
|
||||||
|
@ -22,8 +22,8 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) :
|
|||||||
m_settings (settings),
|
m_settings (settings),
|
||||||
m_palettes_path {":/Palettes"},
|
m_palettes_path {":/Palettes"},
|
||||||
m_ntr0 {0},
|
m_ntr0 {0},
|
||||||
m_bHaveTransmitted {false},
|
m_n {0},
|
||||||
m_n {0}
|
m_bHaveTransmitted {false}
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ void WideGraph::on_spec2dComboBox_currentIndexChanged(const QString &arg1)
|
|||||||
if(arg1=="Reference") {
|
if(arg1=="Reference") {
|
||||||
ui->widePlot->setReference(true);
|
ui->widePlot->setReference(true);
|
||||||
}
|
}
|
||||||
if(ui->widePlot->scaleOK ()) ui->widePlot->draw(swide,false,false);
|
// if(ui->widePlot->scaleOK ()) ui->widePlot->draw(swide,false,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WideGraph::on_fSplitSpinBox_valueChanged(int n) //fSplit
|
void WideGraph::on_fSplitSpinBox_valueChanged(int n) //fSplit
|
||||||
@ -449,17 +449,17 @@ bool WideGraph::useRef() //Flatten
|
|||||||
return m_bRef;
|
return m_bRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WideGraph::replot()
|
||||||
|
{
|
||||||
|
if(ui->widePlot->scaleOK()) ui->widePlot->replot();
|
||||||
|
}
|
||||||
|
|
||||||
void WideGraph::on_gainSlider_valueChanged(int value) //Gain
|
void WideGraph::on_gainSlider_valueChanged(int value) //Gain
|
||||||
{
|
{
|
||||||
ui->widePlot->setPlotGain(value);
|
ui->widePlot->setPlotGain(value);
|
||||||
replot();
|
replot();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WideGraph::replot()
|
|
||||||
{
|
|
||||||
if(ui->widePlot->scaleOK()) ui->widePlot->replot();
|
|
||||||
}
|
|
||||||
|
|
||||||
void WideGraph::on_zeroSlider_valueChanged(int value) //Zero
|
void WideGraph::on_zeroSlider_valueChanged(int value) //Zero
|
||||||
{
|
{
|
||||||
ui->widePlot->setPlotZero(value);
|
ui->widePlot->setPlotZero(value);
|
||||||
|
24
widegraph.ui
24
widegraph.ui
@ -114,6 +114,12 @@
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Spectrum gain</string>
|
<string>Spectrum gain</string>
|
||||||
</property>
|
</property>
|
||||||
@ -169,6 +175,12 @@
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Waterfall gain</string>
|
<string>Waterfall gain</string>
|
||||||
</property>
|
</property>
|
||||||
@ -396,6 +408,12 @@
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Waterfall zero</string>
|
<string>Waterfall zero</string>
|
||||||
</property>
|
</property>
|
||||||
@ -427,6 +445,12 @@
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Spectrum zero</string>
|
<string>Spectrum zero</string>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user