File indexing completed on 2024-10-27 04:50:59

0001 /*
0002    SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "toomanyrecipientswarning.h"
0008 #include <KLocalizedString>
0009 #include <MessageComposer/MessageComposerSettings>
0010 TooManyRecipientsWarning::TooManyRecipientsWarning(QWidget *parent)
0011     : KMessageWidget(parent)
0012 {
0013     setPosition(KMessageWidget::Header);
0014     setVisible(false);
0015     setCloseButtonVisible(true);
0016     setMessageType(Warning);
0017     setWordWrap(true);
0018     setText(i18nc("@info:status",
0019                   "We have reached maximum recipients. Truncating recipients list to %1.",
0020                   MessageComposer::MessageComposerSettings::self()->maximumRecipients()));
0021 }
0022 
0023 TooManyRecipientsWarning::~TooManyRecipientsWarning() = default;
0024 
0025 #include "moc_toomanyrecipientswarning.cpp"