Remove unused IgnoreMessagesPage widget

This commit is contained in:
Rasmus Karlsson
2018-05-13 18:29:57 +02:00
parent 022c31e315
commit 3a48f5db96
4 changed files with 0 additions and 65 deletions
@@ -1,40 +0,0 @@
#include "ignoremessagespage.hpp"
#include "application.hpp"
#include "util/layoutcreator.hpp"
#include <QLabel>
#include <QTextEdit>
namespace chatterino {
namespace widgets {
namespace settingspages {
IgnoreMessagesPage::IgnoreMessagesPage()
: SettingsPage("Ignore Messages", "")
{
auto app = getApp();
util::LayoutCreator<IgnoreMessagesPage> layoutCreator(this);
auto layout = layoutCreator.setLayoutType<QVBoxLayout>();
layout.emplace<QLabel>("Ignored keywords:");
QTextEdit *textEdit = layout.emplace<QTextEdit>().getElement();
textEdit->setPlainText(app->settings->ignoredKeywords);
QObject::connect(textEdit, &QTextEdit::textChanged,
[this] { this->keywordsUpdated.start(200); });
QObject::connect(&this->keywordsUpdated, &QTimer::timeout, [textEdit, app] {
QString text = textEdit->toPlainText();
app->settings->ignoredKeywords = text;
});
// ---- misc
this->keywordsUpdated.setSingleShot(true);
}
} // namespace settingspages
} // namespace widgets
} // namespace chatterino
@@ -1,21 +0,0 @@
#pragma once
#include "widgets/settingspages/settingspage.hpp"
#include <QTimer>
namespace chatterino {
namespace widgets {
namespace settingspages {
class IgnoreMessagesPage : public SettingsPage
{
public:
IgnoreMessagesPage();
QTimer keywordsUpdated;
};
} // namespace settingspages
} // namespace widgets
} // namespace chatterino