1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

Use MainCore code for managing available channel and feature list.

This commit is contained in:
srcejon
2024-02-14 15:36:22 +00:00
parent b046eac470
commit 607d7db702
6 changed files with 29 additions and 145 deletions
@@ -546,21 +546,15 @@ void GS232ControllerGUI::updateSerialPortList(const QStringList& serialPorts)
ui->serialPort->blockSignals(false);
}
void GS232ControllerGUI::updatePipeList(const QList<GS232ControllerSettings::AvailableChannelOrFeature>& sources)
void GS232ControllerGUI::updatePipeList(const QList<MainCore::AvailableChannelOrFeature>& sources)
{
QString currentText = ui->sources->currentText();
QString newText;
ui->sources->blockSignals(true);
ui->sources->clear();
for (const auto& source : sources)
{
QString name = tr("%1%2:%3 %4")
.arg(source.m_kind)
.arg(source.m_superIndex)
.arg(source.m_index)
.arg(source.m_type);
ui->sources->addItem(name);
for (const auto& source : sources) {
ui->sources->addItem(source.getLongId());
}
int index = ui->sources->findText(m_settings.m_source);