Merge branch 'sequence'

audioplugins
Roeland Jansen 2021-06-20 10:43:16 +02:00
commit 86be98f958
2 zmienionych plików z 50 dodań i 1 usunięć

Wyświetl plik

@ -695,6 +695,43 @@ void wfmain::setupMainUI()
freqLock = false;
connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateSizes(int)));
connect(
ui->txPowerSlider, &QSlider::valueChanged,
[=](const int &newValue) { statusFromSliderPercent("Tx Power", newValue);}
);
connect(
ui->rfGainSlider, &QSlider::valueChanged,
[=](const int &newValue) { statusFromSliderPercent("RF Gain", newValue);}
);
connect(
ui->afGainSlider, &QSlider::valueChanged,
[=](const int &newValue) { statusFromSliderPercent("AF Gain", newValue);}
);
connect(
ui->micGainSlider, &QSlider::valueChanged,
[=](const int &newValue) { statusFromSliderPercent("TX Audio Gain", newValue);}
);
connect(
ui->sqlSlider, &QSlider::valueChanged,
[=](const int &newValue) { statusFromSliderPercent("Squelch", newValue);}
);
// -200 0 +200.. take log?
connect(
ui->scopeRefLevelSlider, &QSlider::valueChanged,
[=](const int &newValue) { statusFromSliderRaw("Scope Ref Level", newValue);}
);
connect(
ui->wfLengthSlider, &QSlider::valueChanged,
[=](const int &newValue) { statusFromSliderRaw("Waterfall Length", newValue);}
);
}
void wfmain::updateSizes(int tabIndex)
@ -1836,7 +1873,7 @@ quint64 wfmain::roundFrequencyWithStep(quint64 frequency, int steps, unsigned in
{
frequency = frequency + (quint64)(steps*tsHz);
} else {
frequency = frequency - (quint64)(abs(steps)*tsHz);
frequency = frequency - std::min((quint64)(abs(steps)*tsHz), frequency);
}
if(ui->tuningFloorZerosChk->isChecked())
@ -4005,6 +4042,16 @@ void wfmain::changeSliderQuietly(QSlider *slider, int value)
slider->blockSignals(false);
}
void wfmain::statusFromSliderRaw(QString name, int rawValue)
{
showStatusBarText(name + QString(": %1").arg(rawValue));
}
void wfmain::statusFromSliderPercent(QString name, int rawValue)
{
showStatusBarText(name + QString(": %1\%").arg((int)(100*rawValue/255.0)));
}
void wfmain::receiveTxPower(unsigned char power)
{
changeSliderQuietly(ui->txPowerSlider, power);

Wyświetl plik

@ -665,6 +665,8 @@ private:
void issueDelayedCommandPriority(cmds cmd);
void issueDelayedCommandUnique(cmds cmd);
void changeSliderQuietly(QSlider *slider, int value);
void statusFromSliderPercent(QString name, int percentValue);
void statusFromSliderRaw(QString name, int rawValue);
void processModLevel(rigInput source, unsigned char level);