File indexing completed on 2025-01-19 04:47:01

0001 /*
0002    SPDX-FileCopyrightText: 2024 Laurent Montel <montel.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "adblockviewfilterwidget.h"
0008 #include <QVBoxLayout>
0009 #include <TextCustomEditor/RichTextBrowser>
0010 
0011 AdblockViewFilterWidget::AdblockViewFilterWidget(QWidget *parent)
0012     : QWidget{parent}
0013     , mRichTextBrowser(new TextCustomEditor::RichTextBrowser(this))
0014 {
0015     auto mainLayout = new QVBoxLayout(this);
0016     mainLayout->setObjectName(QStringLiteral("mainLayout"));
0017     mainLayout->setContentsMargins({});
0018 
0019     mRichTextBrowser->setObjectName(QStringLiteral("mRichTextBrowser"));
0020     mainLayout->addWidget(mRichTextBrowser);
0021 }
0022 
0023 AdblockViewFilterWidget::~AdblockViewFilterWidget() = default;
0024 
0025 void AdblockViewFilterWidget::setFilterText(const QString &str)
0026 {
0027     mRichTextBrowser->setPlainText(str);
0028 }
0029 
0030 #include "moc_adblockviewfilterwidget.cpp"