1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 06:04:39 -04:00

Massive UI revamping (v7): devices basic

This commit is contained in:
f4exb
2022-04-07 16:32:03 +02:00
parent 43f53fe26a
commit aad90aeabc
193 changed files with 2598 additions and 691 deletions
@@ -40,9 +40,12 @@ AudioInputGui::AudioInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource(nullptr),
m_centerFrequency(0)
{
setAttribute(Qt::WA_DeleteOnClose, true);
m_sampleSource = (AudioInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(this);
ui->setupUi(getContents());
getContents()->setStyleSheet("#AudioInputGui { border: 1px solid #C06900 }");
m_helpURL = "plugins/samplesource/audioinput/readme.md";
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
@@ -50,6 +53,7 @@ AudioInputGui::AudioInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
displaySettings();
makeUIConnections();
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
@@ -306,3 +310,13 @@ void AudioInputGui::openDeviceSettingsDialog(const QPoint& p)
sendSettings();
}
void AudioInputGui::makeUIConnections()
{
QObject::connect(ui->device, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioInputGui::on_device_currentIndexChanged);
QObject::connect(ui->sampleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioInputGui::on_sampleRate_currentIndexChanged);
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioInputGui::on_decim_currentIndexChanged);
QObject::connect(ui->volume, &QDial::valueChanged, this, &AudioInputGui::on_volume_valueChanged);
QObject::connect(ui->channels, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioInputGui::on_channels_currentIndexChanged);
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &AudioInputGui::on_startStop_toggled);
}