2018-04-25 20:35:32 +02:00
|
|
|
#include "externaltoolspage.hpp"
|
|
|
|
|
2018-04-27 22:11:19 +02:00
|
|
|
#include "application.hpp"
|
2018-04-25 20:35:32 +02:00
|
|
|
#include "util/layoutcreator.hpp"
|
|
|
|
|
|
|
|
#include <QGroupBox>
|
|
|
|
|
|
|
|
#define STREAMLINK_QUALITY "Choose", "Source", "High", "Medium", "Low", "Audio only"
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
namespace widgets {
|
|
|
|
namespace settingspages {
|
|
|
|
|
|
|
|
ExternalToolsPage::ExternalToolsPage()
|
|
|
|
: SettingsPage("External tools", "")
|
|
|
|
{
|
2018-04-27 22:11:19 +02:00
|
|
|
auto app = getApp();
|
|
|
|
|
2018-04-25 20:35:32 +02:00
|
|
|
util::LayoutCreator<ExternalToolsPage> layoutCreator(this);
|
2018-04-26 23:07:02 +02:00
|
|
|
auto layout = layoutCreator.setLayoutType<QVBoxLayout>();
|
2018-04-25 20:35:32 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
auto group = layout.emplace<QGroupBox>("Streamlink");
|
|
|
|
auto groupLayout = group.setLayoutType<QFormLayout>();
|
2018-04-27 22:11:19 +02:00
|
|
|
groupLayout->addRow("Streamlink path:",
|
|
|
|
this->createLineEdit(app->settings->streamlinkPath));
|
|
|
|
groupLayout->addRow(
|
|
|
|
"Prefered quality:",
|
|
|
|
this->createComboBox({STREAMLINK_QUALITY}, app->settings->preferredQuality));
|
|
|
|
groupLayout->addRow("Additional options:",
|
|
|
|
this->createLineEdit(app->settings->streamlinkOpts));
|
2018-04-25 20:35:32 +02:00
|
|
|
}
|
2018-04-26 23:07:02 +02:00
|
|
|
|
|
|
|
layout->addStretch(1);
|
2018-04-25 20:35:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace settingspages
|
|
|
|
} // namespace widgets
|
|
|
|
} // namespace chatterino
|