1
0
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:
Jon Beniston
2022-08-27 10:18:17 +01:00
parent d1a4fca49b
commit d404e9f943
15 changed files with 276 additions and 56 deletions
+14
View File
@@ -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);
}