File indexing completed on 2024-11-24 04:44:20

0001 /*
0002     SPDX-FileCopyrightText: 2018 Daniel Vrátil <dvratil@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "compactpage.h"
0008 #include "lockmethodpage.h"
0009 #include "settings.h"
0010 #include "singlefileresourceconfigbase.h"
0011 
0012 #include <KLocalizedString>
0013 
0014 class MBoxConfigBase : public SingleFileResourceConfigBase<Settings>
0015 {
0016 public:
0017     MBoxConfigBase(const KSharedConfigPtr &config, QWidget *parent, const QVariantList &args)
0018         : SingleFileResourceConfigBase<Settings>(config, parent, args)
0019     {
0020         mWidget->setFilter(QStringLiteral("%1 (*.mbox)").arg(i18nc("Filedialog filter for *.mbox", "MBox file")));
0021         mWidget->addPage(i18n("Compact frequency"), new CompactPage(mSettings->path()));
0022         mWidget->addPage(i18n("Lock method"), new LockMethodPage());
0023     }
0024 };
0025 
0026 class MBoxConfig : public MBoxConfigBase
0027 {
0028     Q_OBJECT
0029 public:
0030     using MBoxConfigBase::MBoxConfigBase;
0031 };
0032 
0033 AKONADI_AGENTCONFIG_FACTORY(MBoxConfigFactory, "mboxconfig.json", MBoxConfig)
0034 
0035 #include "mboxconfig.moc"