mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-02 06:04:39 -04:00
Handle the remove last device in main window with the new sampling device control
This commit is contained in:
@@ -30,6 +30,7 @@ SamplingDeviceControl::SamplingDeviceControl(int tabIndex, bool rxElseTx, QWidge
|
||||
m_selectedDeviceIndex(-1)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->deviceSelectedText->setText("None");
|
||||
}
|
||||
|
||||
SamplingDeviceControl::~SamplingDeviceControl()
|
||||
@@ -75,6 +76,22 @@ void SamplingDeviceControl::setSelectedDeviceIndex(int index)
|
||||
m_selectedDeviceIndex = index;
|
||||
}
|
||||
|
||||
void SamplingDeviceControl::removeSelectedDeviceIndex()
|
||||
{
|
||||
if (m_rxElseTx)
|
||||
{
|
||||
DeviceEnumerator::instance()->removeRxSelection(m_deviceTabIndex);
|
||||
ui->deviceSelectedText->setText("None");
|
||||
}
|
||||
else
|
||||
{
|
||||
DeviceEnumerator::instance()->removeTxSelection(m_deviceTabIndex);
|
||||
ui->deviceSelectedText->setText("None");
|
||||
}
|
||||
|
||||
m_selectedDeviceIndex = -1;
|
||||
}
|
||||
|
||||
QComboBox *SamplingDeviceControl::getChannelSelector()
|
||||
{
|
||||
return ui->channelSelect;
|
||||
|
||||
Reference in New Issue
Block a user