mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
renamed IgnoreUsersPage to IgnoresPage
This commit is contained in:
parent
d925704aa9
commit
1da23e5e91
5 changed files with 40 additions and 40 deletions
|
@ -199,7 +199,6 @@ SOURCES += \
|
||||||
src/widgets/settingspages/EmotesPage.cpp \
|
src/widgets/settingspages/EmotesPage.cpp \
|
||||||
src/widgets/settingspages/ExternalToolsPage.cpp \
|
src/widgets/settingspages/ExternalToolsPage.cpp \
|
||||||
src/widgets/settingspages/HighlightingPage.cpp \
|
src/widgets/settingspages/HighlightingPage.cpp \
|
||||||
src/widgets/settingspages/IgnoreusersPage.cpp \
|
|
||||||
src/widgets/settingspages/KeyboardSettingsPage.cpp \
|
src/widgets/settingspages/KeyboardSettingsPage.cpp \
|
||||||
src/widgets/settingspages/LogsPage.cpp \
|
src/widgets/settingspages/LogsPage.cpp \
|
||||||
src/widgets/settingspages/ModerationPage.cpp \
|
src/widgets/settingspages/ModerationPage.cpp \
|
||||||
|
@ -228,7 +227,8 @@ SOURCES += \
|
||||||
src/widgets/settingspages/LookPage.cpp \
|
src/widgets/settingspages/LookPage.cpp \
|
||||||
src/widgets/settingspages/FeelPage.cpp \
|
src/widgets/settingspages/FeelPage.cpp \
|
||||||
src/util/InitUpdateButton.cpp \
|
src/util/InitUpdateButton.cpp \
|
||||||
src/widgets/dialogs/UpdateDialog.cpp
|
src/widgets/dialogs/UpdateDialog.cpp \
|
||||||
|
src/widgets/settingspages/IgnoresPage.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
src/Application.hpp \
|
src/Application.hpp \
|
||||||
|
@ -370,7 +370,6 @@ HEADERS += \
|
||||||
src/widgets/settingspages/EmotesPage.hpp \
|
src/widgets/settingspages/EmotesPage.hpp \
|
||||||
src/widgets/settingspages/ExternalToolsPage.hpp \
|
src/widgets/settingspages/ExternalToolsPage.hpp \
|
||||||
src/widgets/settingspages/HighlightingPage.hpp \
|
src/widgets/settingspages/HighlightingPage.hpp \
|
||||||
src/widgets/settingspages/IgnoreusersPage.hpp \
|
|
||||||
src/widgets/settingspages/KeyboardSettingsPage.hpp \
|
src/widgets/settingspages/KeyboardSettingsPage.hpp \
|
||||||
src/widgets/settingspages/LogsPage.hpp \
|
src/widgets/settingspages/LogsPage.hpp \
|
||||||
src/widgets/settingspages/ModerationPage.hpp \
|
src/widgets/settingspages/ModerationPage.hpp \
|
||||||
|
@ -404,7 +403,8 @@ HEADERS += \
|
||||||
src/widgets/settingspages/LookPage.hpp \
|
src/widgets/settingspages/LookPage.hpp \
|
||||||
src/widgets/settingspages/FeelPage.hpp \
|
src/widgets/settingspages/FeelPage.hpp \
|
||||||
src/util/InitUpdateButton.hpp \
|
src/util/InitUpdateButton.hpp \
|
||||||
src/widgets/dialogs/UpdateDialog.hpp
|
src/widgets/dialogs/UpdateDialog.hpp \
|
||||||
|
src/widgets/settingspages/IgnorePage.hpp
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
resources/resources.qrc \
|
resources/resources.qrc \
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "widgets/settingspages/ExternalToolsPage.hpp"
|
#include "widgets/settingspages/ExternalToolsPage.hpp"
|
||||||
#include "widgets/settingspages/FeelPage.hpp"
|
#include "widgets/settingspages/FeelPage.hpp"
|
||||||
#include "widgets/settingspages/HighlightingPage.hpp"
|
#include "widgets/settingspages/HighlightingPage.hpp"
|
||||||
#include "widgets/settingspages/IgnoreusersPage.hpp"
|
#include "widgets/settingspages/IgnorePage.hpp"
|
||||||
#include "widgets/settingspages/KeyboardSettingsPage.hpp"
|
#include "widgets/settingspages/KeyboardSettingsPage.hpp"
|
||||||
#include "widgets/settingspages/LogsPage.hpp"
|
#include "widgets/settingspages/LogsPage.hpp"
|
||||||
#include "widgets/settingspages/LookPage.hpp"
|
#include "widgets/settingspages/LookPage.hpp"
|
||||||
|
@ -90,7 +90,7 @@ void SettingsDialog::addTabs()
|
||||||
this->addTab(new CommandPage);
|
this->addTab(new CommandPage);
|
||||||
// this->addTab(new EmotesPage);
|
// this->addTab(new EmotesPage);
|
||||||
this->addTab(new HighlightingPage);
|
this->addTab(new HighlightingPage);
|
||||||
this->addTab(new IgnoreUsersPage);
|
this->addTab(new IgnoresPage);
|
||||||
|
|
||||||
this->ui_.tabContainer->addSpacing(16);
|
this->ui_.tabContainer->addSpacing(16);
|
||||||
|
|
||||||
|
|
|
@ -43,13 +43,13 @@ HighlightingPage::HighlightingPage()
|
||||||
auto tabs = layout.emplace<QTabWidget>();
|
auto tabs = layout.emplace<QTabWidget>();
|
||||||
{
|
{
|
||||||
// HIGHLIGHTS
|
// HIGHLIGHTS
|
||||||
auto highlights = tabs.appendTab(new QVBoxLayout, "Highlights");
|
auto highlights = tabs.appendTab(new QVBoxLayout, "Phrases");
|
||||||
{
|
{
|
||||||
EditableModelView *view =
|
EditableModelView *view =
|
||||||
highlights.emplace<EditableModelView>(app->highlights->createModel(nullptr))
|
highlights.emplace<EditableModelView>(app->highlights->createModel(nullptr))
|
||||||
.getElement();
|
.getElement();
|
||||||
|
|
||||||
view->setTitles({"Pattern", "Flash taskbar", "Play sound", "Regex"});
|
view->setTitles({"Pattern", "Flash\ntaskbar", "Play\nsound", "Enable\nregex"});
|
||||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
|
view->getTableView()->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
|
||||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(
|
view->getTableView()->horizontalHeader()->setSectionResizeMode(
|
||||||
0, QHeaderView::Stretch);
|
0, QHeaderView::Stretch);
|
||||||
|
@ -66,37 +66,13 @@ HighlightingPage::HighlightingPage()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
auto disabledUsers = tabs.appendTab(new QVBoxLayout, "Disabled Users");
|
auto pingUsers = tabs.appendTab(new QVBoxLayout, "Users");
|
||||||
{
|
|
||||||
EditableModelView *view =
|
|
||||||
disabledUsers
|
|
||||||
.emplace<EditableModelView>(app->highlights->createBlacklistModel(nullptr))
|
|
||||||
.getElement();
|
|
||||||
|
|
||||||
view->setTitles({"Pattern", "Regex"});
|
|
||||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
|
|
||||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(
|
|
||||||
0, QHeaderView::Stretch);
|
|
||||||
|
|
||||||
// fourtf: make class extrend BaseWidget and add this to dpiChanged
|
|
||||||
QTimer::singleShot(1, [view] {
|
|
||||||
view->getTableView()->resizeColumnsToContents();
|
|
||||||
view->getTableView()->setColumnWidth(0, 200);
|
|
||||||
});
|
|
||||||
|
|
||||||
view->addButtonPressed.connect([] {
|
|
||||||
getApp()->highlights->blacklistedUsers.appendItem(
|
|
||||||
HighlightBlacklistUser{"blacklisted user", false});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
auto pingUsers = tabs.appendTab(new QVBoxLayout, "Highlight on message");
|
|
||||||
{
|
{
|
||||||
EditableModelView *view =
|
EditableModelView *view =
|
||||||
pingUsers.emplace<EditableModelView>(app->highlights->createUserModel(nullptr))
|
pingUsers.emplace<EditableModelView>(app->highlights->createUserModel(nullptr))
|
||||||
.getElement();
|
.getElement();
|
||||||
|
|
||||||
view->setTitles({"Username", "Flash taskbar", "Play sound", "Regex"});
|
view->setTitles({"Username", "Flash\ntaskbar", "Play\nsound", "Enable\nregex"});
|
||||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
|
view->getTableView()->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
|
||||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(
|
view->getTableView()->horizontalHeader()->setSectionResizeMode(
|
||||||
0, QHeaderView::Stretch);
|
0, QHeaderView::Stretch);
|
||||||
|
@ -112,6 +88,30 @@ HighlightingPage::HighlightingPage()
|
||||||
HighlightPhrase{"highlighted user", true, false, false});
|
HighlightPhrase{"highlighted user", true, false, false});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto disabledUsers = tabs.appendTab(new QVBoxLayout, "Excluded Users");
|
||||||
|
{
|
||||||
|
EditableModelView *view =
|
||||||
|
disabledUsers
|
||||||
|
.emplace<EditableModelView>(app->highlights->createBlacklistModel(nullptr))
|
||||||
|
.getElement();
|
||||||
|
|
||||||
|
view->setTitles({"Pattern", "Enable\nregex"});
|
||||||
|
view->getTableView()->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
|
||||||
|
view->getTableView()->horizontalHeader()->setSectionResizeMode(
|
||||||
|
0, QHeaderView::Stretch);
|
||||||
|
|
||||||
|
// fourtf: make class extrend BaseWidget and add this to dpiChanged
|
||||||
|
QTimer::singleShot(1, [view] {
|
||||||
|
view->getTableView()->resizeColumnsToContents();
|
||||||
|
view->getTableView()->setColumnWidth(0, 200);
|
||||||
|
});
|
||||||
|
|
||||||
|
view->addButtonPressed.connect([] {
|
||||||
|
getApp()->highlights->blacklistedUsers.appendItem(
|
||||||
|
HighlightBlacklistUser{"blacklisted user", false});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MISC
|
// MISC
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
class IgnoreUsersPage : public SettingsPage
|
class IgnoresPage : public SettingsPage
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IgnoreUsersPage();
|
IgnoresPage();
|
||||||
|
|
||||||
void onShow() final;
|
void onShow() final;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "IgnoreusersPage.hpp"
|
#include "IgnorePage.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
|
@ -23,12 +23,12 @@
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
IgnoreUsersPage::IgnoreUsersPage()
|
IgnoresPage::IgnoresPage()
|
||||||
: SettingsPage("Ignores", "")
|
: SettingsPage("Ignores", "")
|
||||||
{
|
{
|
||||||
auto app = getApp();
|
auto app = getApp();
|
||||||
|
|
||||||
LayoutCreator<IgnoreUsersPage> layoutCreator(this);
|
LayoutCreator<IgnoresPage> layoutCreator(this);
|
||||||
auto layout = layoutCreator.setLayoutType<QVBoxLayout>();
|
auto layout = layoutCreator.setLayoutType<QVBoxLayout>();
|
||||||
|
|
||||||
// auto group = layout.emplace<QGroupBox>("Ignored users").setLayoutType<QVBoxLayout>();
|
// auto group = layout.emplace<QGroupBox>("Ignored users").setLayoutType<QVBoxLayout>();
|
||||||
|
@ -85,7 +85,7 @@ IgnoreUsersPage::IgnoreUsersPage()
|
||||||
label->setStyleSheet("color: #BBB");
|
label->setStyleSheet("color: #BBB");
|
||||||
}
|
}
|
||||||
|
|
||||||
void IgnoreUsersPage::onShow()
|
void IgnoresPage::onShow()
|
||||||
{
|
{
|
||||||
auto app = getApp();
|
auto app = getApp();
|
||||||
|
|
Loading…
Reference in a new issue