File indexing completed on 2024-12-15 04:55:36

0001 /*
0002    SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "importimapsettingfinishpage.h"
0008 #include <KLocalizedString>
0009 #include <QLabel>
0010 #include <QTextEdit>
0011 #include <QVBoxLayout>
0012 
0013 ImportImapSettingFinishPage::ImportImapSettingFinishPage(QWidget *parent)
0014     : QWidget(parent)
0015     , mTextEdit(new QTextEdit(this))
0016 {
0017     auto mainlayout = new QVBoxLayout(this);
0018     mainlayout->setObjectName(QLatin1StringView("mainlayout"));
0019 
0020     auto label = new QLabel(i18n("IMAP settings were imported:"), this);
0021     label->setObjectName(QLatin1StringView("label"));
0022     mainlayout->addWidget(label);
0023 
0024     mTextEdit->setObjectName(QLatin1StringView("textedit"));
0025     mTextEdit->setAcceptRichText(true);
0026     mTextEdit->setReadOnly(true);
0027     mainlayout->addWidget(mTextEdit);
0028 }
0029 
0030 ImportImapSettingFinishPage::~ImportImapSettingFinishPage() = default;
0031 
0032 void ImportImapSettingFinishPage::addSummary(const QString &name)
0033 {
0034     mTextEdit->append(name);
0035 }
0036 
0037 #include "moc_importimapsettingfinishpage.cpp"