mirror-chatterino2/src/widgets/settingspages/externaltoolspage.cpp

40 lines
1.2 KiB
C++
Raw Normal View History

2018-04-25 20:35:32 +02:00
#include "externaltoolspage.hpp"
#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", "")
{
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>();
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