File indexing completed on 2025-01-19 04:46:52

0001 /*
0002    SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "folderconfiguresettingsviewwidget.h"
0008 #include <MailCommon/CollectionViewWidget>
0009 #include <QHBoxLayout>
0010 FolderConfigureSettingsViewWidget::FolderConfigureSettingsViewWidget(QWidget *parent)
0011     : FolderConfigureSettingsPageBase(parent)
0012     , mCollectionViewWidget(new MailCommon::CollectionViewWidget(this))
0013 {
0014     auto mainWidget = new QWidget(this);
0015     auto mainLayout = new QHBoxLayout(mainWidget);
0016     mCollectionViewWidget->setObjectName(QLatin1StringView("mCollectionTemplateWidget"));
0017     mainLayout->addWidget(mCollectionViewWidget);
0018     addMainWidget(mainWidget);
0019     mMainLayout->addStretch();
0020 }
0021 
0022 FolderConfigureSettingsViewWidget::~FolderConfigureSettingsViewWidget() = default;
0023 
0024 void FolderConfigureSettingsViewWidget::save(Akonadi::Collection &col)
0025 {
0026     if (wasModified()) {
0027         mCollectionViewWidget->save(col);
0028     }
0029 }
0030 
0031 #include "moc_folderconfiguresettingsviewwidget.cpp"