mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-03 06:24:48 -04:00
Add start/stop all devices button in toolbar. Add device stateChanged signal. Use in RTL SDR GUI for updating device state
This commit is contained in:
@@ -51,6 +51,15 @@ DeviceAPI::DeviceAPI(
|
||||
m_deviceSinkEngine(deviceSinkEngine),
|
||||
m_deviceMIMOEngine(deviceMIMOEngine)
|
||||
{
|
||||
if (m_deviceSourceEngine) {
|
||||
QObject::connect(m_deviceSourceEngine, &DSPDeviceSourceEngine::stateChanged, this, &DeviceAPI::engineStateChanged);
|
||||
}
|
||||
if (m_deviceSinkEngine) {
|
||||
QObject::connect(m_deviceSinkEngine, &DSPDeviceSinkEngine::stateChanged, this, &DeviceAPI::engineStateChanged);
|
||||
}
|
||||
if (m_deviceMIMOEngine) {
|
||||
QObject::connect(m_deviceMIMOEngine, &DSPDeviceMIMOEngine::stateChanged, this, &DeviceAPI::engineStateChanged);
|
||||
}
|
||||
}
|
||||
|
||||
DeviceAPI::~DeviceAPI()
|
||||
@@ -826,3 +835,8 @@ void DeviceAPI::setDeviceSetIndex(int deviceSetIndex)
|
||||
m_deviceTabIndex = deviceSetIndex;
|
||||
renumerateChannels();
|
||||
}
|
||||
|
||||
void DeviceAPI::engineStateChanged()
|
||||
{
|
||||
emit stateChanged(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user