Commit ae7ead01 authored by Andreas Traczyk's avatar Andreas Traczyk

call recording: enable recording ui

- provides toggle for 'always recording'
- provides toggle for 'record preview'
- provides slider to control recording quality

Change-Id: I33180397d4795f7aa6998570ec43b7382ff9f481
parent 01da004a
......@@ -772,7 +772,13 @@ void SettingsWidget::setConnections()
// audio / visual settings
connect(ui->recordPathButton, &QPushButton::clicked, this, &SettingsWidget::openRecordFolderSlot);
connect(ui->alwaysRecordingCheckBox, &QAbstractButton::clicked, this, &SettingsWidget::slotAlwaysRecordingClicked);
connect(ui->recordPreviewCheckBox, &QAbstractButton::clicked, this, &SettingsWidget::slotRecordPreviewClicked);
connect(ui->recordPathButton, &QAbstractButton::clicked, this, &SettingsWidget::openRecordFolderSlot);
connect(ui->recordQualitySlider, &QAbstractSlider::valueChanged, this, &SettingsWidget::slotRecordQualityChanged);
connect(ui->hardwareAccelCheckBox, &QAbstractButton::clicked, this, &SettingsWidget::slotSetHardwareAccel);
}
......@@ -795,7 +801,17 @@ void SettingsWidget::populateGeneralSettings()
auto notifs = settings.value(SettingsKey::enableNotifications).toBool();
ui->notificationCheckBox->setChecked(notifs);
//recordings
// recording
auto alwaysRecord = LRCInstance::avModel().getAlwaysRecord();
ui->alwaysRecordingCheckBox->setChecked(alwaysRecord);
auto recordPreview = LRCInstance::avModel().getRecordPreview();
ui->recordPreviewCheckBox->setChecked(recordPreview);
auto recordQuality = LRCInstance::avModel().getRecordQuality();
ui->recordQualityValueLabel->setText(QString::number(recordQuality / 1000) + " MB/s");
ui->recordQualitySlider->setValue(recordQuality);
if (LRCInstance::avModel().getRecordPath().empty()) {
QString recordPath = QDir::toNativeSeparators(
QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
......@@ -805,6 +821,7 @@ void SettingsWidget::populateGeneralSettings()
Utils::setElidedText(ui->recordPathButton,
QString::fromStdString(LRCInstance::avModel().getRecordPath()));
// updates
#ifdef Q_OS_WIN
ui->autoUpdateCheckBox->setChecked(settings.value(SettingsKey::autoUpdate).toBool());
#endif
......@@ -867,7 +884,23 @@ void SettingsWidget::openRecordFolderSlot()
}
}
// ************************* Audio/Visual Settings *************************
void SettingsWidget::slotAlwaysRecordingClicked(bool state)
{
LRCInstance::avModel().setAlwaysRecord(state);
}
void SettingsWidget::slotRecordPreviewClicked(bool state)
{
LRCInstance::avModel().setRecordPreview(state);
}
void SettingsWidget::slotRecordQualityChanged(int value)
{
ui->recordQualityValueLabel->setText(QString::number(value / 1000) + " MB/s");
LRCInstance::avModel().setRecordQuality(value);
}
// ************************* Audio/Visual Settings ************recordQuality*************
void SettingsWidget::populateAVSettings()
{
......
......@@ -115,7 +115,7 @@ private slots:
void verifyRegisteredNameSlot();
void beforeNameLookup();
void receiveRegNameSlot(const std::string& accountID, lrc::api::account::LookupStatus status,
const std::string& address, const std::string& name);
const std::string& address, const std::string& name);
void slotRegisterName();
void setAccEnableSlot(int state);
void delAccountSlot();
......@@ -131,6 +131,9 @@ private slots:
void slotSetClosedOrMin(bool state);
void openDownloadFolderSlot();
void openRecordFolderSlot();
void slotAlwaysRecordingClicked(bool state);
void slotRecordPreviewClicked(bool state);
void slotRecordQualityChanged(int value);
void slotSetUpdateAutomatic(bool state);
void outputDevIndexChangedSlot(int index);
void inputdevIndexChangedSlot(int index);
......
This diff is collapsed.
......@@ -43,8 +43,6 @@ VideoOverlay::VideoOverlay(QWidget* parent) :
ui->onHoldLabel->setVisible(false);
ui->recButton->setVisible(false);
ui->transferCallButton->setVisible(false);
ui->transferCallButton->setCheckable(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment