GUI tweaks

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2620 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-09-29 23:52:01 +00:00
parent c97bd103d3
commit 4908d11039
2 changed files with 12 additions and 6 deletions

View File

@ -194,7 +194,8 @@ void CPlotter::DrawOverlay() //DrawOverlay()
m_freqPerDiv=10; m_freqPerDiv=10;
if(n>25) m_freqPerDiv=50; if(n>25) m_freqPerDiv=50;
if(n>70) m_freqPerDiv=100; if(n>70) m_freqPerDiv=100;
if(n>250) m_freqPerDiv=500; if(n>140) m_freqPerDiv=200;
if(n>310) m_freqPerDiv=500;
m_hdivs = w*df/m_freqPerDiv + 0.9999; m_hdivs = w*df/m_freqPerDiv + 0.9999;
m_ScalePixmap.fill(Qt::white); m_ScalePixmap.fill(Qt::white);
painter0.drawRect(0, 0, w, 30); painter0.drawRect(0, 0, w, 30);
@ -205,8 +206,10 @@ void CPlotter::DrawOverlay() //DrawOverlay()
x = (int)( (float)i*pixperdiv ); x = (int)( (float)i*pixperdiv );
painter0.drawLine(x,18,x,30); painter0.drawLine(x,18,x,30);
} }
for( int i=1; i<5*m_hdivs; i++) { //minor ticks int minor=5;
x = i*pixperdiv/5.0; if(m_freqPerDiv==200) minor=4;
for( int i=1; i<minor*m_hdivs; i++) { //minor ticks
x = i*pixperdiv/minor;
painter0.drawLine(x,24,x,30); painter0.drawLine(x,24,x,30);
} }
@ -355,7 +358,10 @@ void CPlotter::setBinsPerPixel(int n) // set nbpp
update(); //trigger a new paintEvent} update(); //trigger a new paintEvent}
} }
int CPlotter::binsPerPixel(){return m_binsPerPixel;} //get nbpp int CPlotter::binsPerPixel() // get nbpp
{
return m_binsPerPixel;
}
void CPlotter::setFQSO(int x, bool bf) //setFQSO() void CPlotter::setFQSO(int x, bool bf) //setFQSO()
{ {

View File

@ -32,8 +32,8 @@ WideGraph::WideGraph(QWidget *parent) :
int w = settings.value("PlotWidth",1000).toInt(); int w = settings.value("PlotWidth",1000).toInt();
ui->freqSpanSpinBox->setValue(n); ui->freqSpanSpinBox->setValue(n);
ui->widePlot->setNSpan(n); ui->widePlot->setNSpan(n);
int nbpp = n * 32768.0/(w*96.0) + 0.5; // int nbpp = n * 32768.0/(w*96.0) + 0.5;
ui->widePlot->setBinsPerPixel(nbpp); ui->widePlot->setBinsPerPixel(1);
m_waterfallAvg = settings.value("WaterfallAvg",10).toInt(); m_waterfallAvg = settings.value("WaterfallAvg",10).toInt();
ui->waterfallAvgSpinBox->setValue(m_waterfallAvg); ui->waterfallAvgSpinBox->setValue(m_waterfallAvg);
m_dialFreq=settings.value("DialFreqMHz",473.000).toDouble(); m_dialFreq=settings.value("DialFreqMHz",473.000).toDouble();