Basic logging implemented

Implemented scuffed logging settings page
Add helper function to PathManager to create an arbitrary folder
This commit is contained in:
Rasmus Karlsson
2018-01-28 14:23:55 +01:00
parent f474db9443
commit 2f0844ebd9
14 changed files with 201 additions and 151 deletions
+20
View File
@@ -1,12 +1,32 @@
#include "logspage.hpp"
#include <QFormLayout>
#include <QVBoxLayout>
#include "util/layoutcreator.hpp"
namespace chatterino {
namespace widgets {
namespace settingspages {
LogsPage::LogsPage()
: SettingsPage("Logs", "")
{
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);
}
} // namespace settingspages
} // namespace widgets
} // namespace chatterino