Mailcommon

invalidfilterwidget.cpp
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "invalidfilterwidget.h"
8#include "invalidfilterlistview.h"
9#include <KLocalizedString>
10#include <QLabel>
11#include <QVBoxLayout>
12
13using namespace MailCommon;
14
15InvalidFilterWidget::InvalidFilterWidget(QWidget *parent)
16 : QWidget(parent)
17 , mInvalidFilterListWidget(new InvalidFilterListView(this))
18{
19 auto vbox = new QVBoxLayout(this);
20 vbox->setContentsMargins({});
21 auto lab = new QLabel(i18nc("@label:textbox",
22 "The following filters are invalid (e.g. containing no actions "
23 "or no search rules). Discard or edit invalid filters?"));
24 lab->setWordWrap(true);
25 lab->setObjectName(QLatin1StringView("label"));
26 vbox->addWidget(lab);
27
28 mInvalidFilterListWidget->setObjectName(QLatin1StringView("invalidfilterlist"));
29 connect(mInvalidFilterListWidget, &InvalidFilterListView::showDetails, this, &InvalidFilterWidget::showDetails);
30 connect(mInvalidFilterListWidget, &InvalidFilterListView::hideInformationWidget, this, &InvalidFilterWidget::hideInformationWidget);
31 vbox->addWidget(mInvalidFilterListWidget);
32}
33
34InvalidFilterWidget::~InvalidFilterWidget() = default;
35
36void InvalidFilterWidget::setInvalidFilters(const QList<InvalidFilterInfo> &lst)
37{
38 mInvalidFilterListWidget->setInvalidFilters(lst);
39}
40
41#include "moc_invalidfilterwidget.cpp"
QString i18nc(const char *context, const char *text, const TYPE &arg...)
The filter dialog.
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.