kopia lustrzana https://github.com/PianetaRadio/CatRadio
rodzic
d8c9bf1594
commit
8c4d24c5e2
|
@ -171,7 +171,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
ui->progressBar_Smeter->setGateValue(80);
|
||||
ui->progressBar_Smeter->setValue(-54);
|
||||
ui->progressBar_Smeter->resetPeakValue();
|
||||
ui->progressBar_Smeter->setPeakFactor(rigCom.rigRefresh/1000.0/2);
|
||||
ui->progressBar_Smeter->setPeakFactor(rigCom.rigRefresh/1000.0);
|
||||
|
||||
//VFO
|
||||
ui->lineEdit_vfoMain->setValue(0);
|
||||
|
|
|
@ -204,7 +204,7 @@
|
|||
<rect>
|
||||
<x>200</x>
|
||||
<y>10</y>
|
||||
<width>40</width>
|
||||
<width>51</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -217,7 +217,7 @@
|
|||
<rect>
|
||||
<x>430</x>
|
||||
<y>10</y>
|
||||
<width>40</width>
|
||||
<width>51</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
|
@ -126,6 +126,7 @@ void SMeter::drawProgress(QPainter *painter)
|
|||
void SMeter::drawPeak(QPainter *painter)
|
||||
{
|
||||
double max, min;
|
||||
double gate;
|
||||
|
||||
painter->save();
|
||||
painter->setPen(Qt::NoPen);
|
||||
|
@ -134,11 +135,13 @@ void SMeter::drawPeak(QPainter *painter)
|
|||
{
|
||||
max = maxValue;
|
||||
min = minValue;
|
||||
gate = gateValue;
|
||||
}
|
||||
else //SMeter
|
||||
{
|
||||
max = 60;
|
||||
min = -54;
|
||||
gate = 0;
|
||||
}
|
||||
|
||||
double length = width()-14;
|
||||
|
@ -149,7 +152,7 @@ void SMeter::drawPeak(QPainter *painter)
|
|||
else peakValue = peakValue - peakFactor*(peakValue - currentValue);
|
||||
if (peakValue>max) peakValue = max;
|
||||
|
||||
if (peakValue>=gateValue) painter->setBrush(QColor(Qt::red));
|
||||
if (peakValue>=gate) painter->setBrush(QColor(Qt::red));
|
||||
else painter->setBrush(progressColor);
|
||||
|
||||
initX = (peakValue - min) * increment;
|
||||
|
|
Ładowanie…
Reference in New Issue