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

33 lines
808 B
C++
Raw Normal View History

2018-01-12 23:09:05 +01:00
#include "logspage.hpp"
#include <QFormLayout>
#include <QVBoxLayout>
#include "util/layoutcreator.hpp"
2018-01-12 23:09:05 +01:00
namespace chatterino {
namespace widgets {
namespace settingspages {
2018-01-12 23:09:05 +01:00
LogsPage::LogsPage()
: SettingsPage("Logs", "")
2018-01-12 23:09:05 +01:00
{
singletons::SettingManager &settings = singletons::SettingManager::getInstance();
util::LayoutCreator<LogsPage> layoutCreator(this);
auto layout = layoutCreator.emplace<QVBoxLayout>().withoutMargin();
{
auto form = layout.emplace<QFormLayout>();
// clang-format off
form->addRow("Enabled:", this->createCheckBox("Enable logging", settings.enableLogging));
// clang-format on
}
layout->addStretch(1);
2018-01-12 23:09:05 +01:00
}
2018-01-12 23:09:05 +01:00
} // namespace settingspages
} // namespace widgets
} // namespace chatterino