Changeset View
Changeset View
Standalone View
Standalone View
src/dialogs/kdenlivesettingsdialog.cpp
Context not available. | |||||
298 | &KdenliveSettingsDialog::slotUpdateGrabProfile); | 298 | &KdenliveSettingsDialog::slotUpdateGrabProfile); | ||
---|---|---|---|---|---|
299 | connect(m_configCapture.grab_showprofileinfo, &QAbstractButton::clicked, m_configCapture.grab_parameters, &QWidget::setVisible); | 299 | connect(m_configCapture.grab_showprofileinfo, &QAbstractButton::clicked, m_configCapture.grab_parameters, &QWidget::setVisible); | ||
300 | 300 | | |||
301 | m_configCapture.audiocapturechannels->setCurrentIndex(KdenliveSettings::audiocapturechannels() == 1 ? 0 : 1); | ||||
302 | connect(m_configCapture.audiocapturechannels, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, | ||||
303 | &KdenliveSettingsDialog::slotUpdateAudioCaptureChannels); | ||||
304 | | ||||
305 | m_configCapture.audiocapturesamplerate->setCurrentIndex(KdenliveSettings::audiocapturesamplerate() == 44100 ? 0 : 1); | ||||
306 | connect(m_configCapture.audiocapturesamplerate, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, | ||||
307 | &KdenliveSettingsDialog::slotUpdateAudioCaptureSampleRate); | ||||
308 | | ||||
309 | m_configCapture.labelNoAudioDevices->setVisible(false); | ||||
310 | | ||||
301 | // Timeline preview | 311 | // Timeline preview | ||
302 | act = new QAction(QIcon::fromTheme(QStringLiteral("configure")), i18n("Configure profiles"), this); | 312 | act = new QAction(QIcon::fromTheme(QStringLiteral("configure")), i18n("Configure profiles"), this); | ||
303 | act->setData(1); | 313 | act->setData(1); | ||
Context not available. | |||||
398 | bool KdenliveSettingsDialog::initAudioRecDevice() | 408 | bool KdenliveSettingsDialog::initAudioRecDevice() | ||
399 | { | 409 | { | ||
400 | QStringList audioDevices = pCore->getAudioCaptureDevices(); | 410 | QStringList audioDevices = pCore->getAudioCaptureDevices(); | ||
411 | | ||||
412 | //show a hint to the user to know what to check for in case the device list are empty (common issue) | ||||
413 | m_configCapture.labelNoAudioDevices->setVisible(audioDevices.empty()); | ||||
414 | | ||||
401 | m_configCapture.kcfg_defaultaudiocapture->addItems(audioDevices); | 415 | m_configCapture.kcfg_defaultaudiocapture->addItems(audioDevices); | ||
402 | connect(m_configCapture.kcfg_defaultaudiocapture, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [&]() { | 416 | connect(m_configCapture.kcfg_defaultaudiocapture, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [&]() { | ||
403 | QString currentDevice = m_configCapture.kcfg_defaultaudiocapture->currentText(); | 417 | QString currentDevice = m_configCapture.kcfg_defaultaudiocapture->currentText(); | ||
Context not available. | |||||
1584 | QTimer::singleShot(200, this, SLOT(slotUpdateShuttleDevice())); | 1598 | QTimer::singleShot(200, this, SLOT(slotUpdateShuttleDevice())); | ||
1585 | #endif // USE_JOGSHUTTLE | 1599 | #endif // USE_JOGSHUTTLE | ||
1586 | } | 1600 | } | ||
1601 | | ||||
1602 | void KdenliveSettingsDialog::slotUpdateAudioCaptureChannels(int index) | ||||
1603 | { | ||||
1604 | KdenliveSettings::setAudiocapturechannels(index == 0 ? 1 : 2); | ||||
1605 | } | ||||
1606 | | ||||
1607 | void KdenliveSettingsDialog::slotUpdateAudioCaptureSampleRate(int index) | ||||
1608 | { | ||||
1609 | KdenliveSettings::setAudiocapturesamplerate(index == 0 ? 44100 : 48000); | ||||
1610 | } | ||||
Context not available. |