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

35 lines
1.1 KiB
C++
Raw Normal View History

2018-04-25 20:35:32 +02:00
#include "externaltoolspage.hpp"
#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", "")
{
singletons::SettingManager &settings = singletons::SettingManager::getInstance();
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(settings.streamlinkPath));
groupLayout->addRow("Prefered quality:",
this->createComboBox({STREAMLINK_QUALITY}, settings.preferredQuality));
groupLayout->addRow("Additional options:", this->createLineEdit(settings.streamlinkOpts));
}
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