Simple streamlink support (#97)

* Simple streamlink support

Relies on settings entry & loads best available quality by default.
This commit is contained in:
Confuseh
2017-08-12 13:44:27 +01:00
committed by pajlada
parent 63f85e9bee
commit a6573e83e0
7 changed files with 39 additions and 1 deletions
+14
View File
@@ -312,6 +312,8 @@ void SettingsDialog::addTabs()
auto scroll = new QSlider(Qt::Horizontal);
form->addRow("Mouse scroll speed:", scroll);
form->addRow("Streamlink Path", createLineEdit(settings.streamlinkPath));
// v->addWidget(scroll);
// v->addStretch(1);
// vbox->addLayout(v);
@@ -583,6 +585,18 @@ QHBoxLayout *SettingsDialog::createCombobox(
return box;
}
QLineEdit *SettingsDialog::createLineEdit(pajlada::Settings::Setting<std::string> &setting)
{
auto widget = new QLineEdit(QString::fromStdString(setting.getValue()));
QObject::connect(widget, &QLineEdit::textChanged, this,
[&setting](const QString &newValue) {
setting = newValue.toStdString();
});
return widget;
}
void SettingsDialog::okButtonClicked()
{
this->close();