#include "ignoreuserspage.hpp" #include "singletons/settingsmanager.hpp" #include "util/layoutcreator.hpp" #include #include #include #include #include #include // clang-format off #define INFO "/ignore in chat ignores a user\n/unignore in chat unignores a user" // clang-format on namespace chatterino { namespace widgets { namespace settingspages { IgnoreUsersPage::IgnoreUsersPage() : SettingsPage("Ignores", "") { singletons::SettingManager &settings = singletons::SettingManager::getInstance(); util::LayoutCreator layoutCreator(this); auto layout = layoutCreator.setLayoutType(); // auto group = layout.emplace("Ignored users").setLayoutType(); auto tabs = layout.emplace(); tabs->setStyleSheet("color: #000"); // users auto users = tabs.appendTab(new QVBoxLayout, "Users"); { users.append( this->createCheckBox("Enable twitch ignored users", settings.enableTwitchIgnoredUsers)); auto anyways = users.emplace().withoutMargin(); { anyways.emplace("Show anyways if:"); anyways.emplace(); anyways->addStretch(1); } auto addremove = users.emplace().withoutMargin(); { auto add = addremove.emplace("Ignore user"); auto remove = addremove.emplace("Unignore User"); UNUSED(add); // TODO: Add on-clicked event UNUSED(remove); // TODO: Add on-clicked event addremove->addStretch(1); } auto userList = users.emplace(); UNUSED(userList); // TODO: Fill this list in with ignored users } // messages auto messages = tabs.appendTab(new QVBoxLayout, "Messages"); { messages.emplace("wip"); } auto label = layout.emplace(INFO); label->setWordWrap(true); label->setStyleSheet("color: #BBB"); } } // namespace settingspages } // namespace widgets } // namespace chatterino