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

0001 /*
0002    SPDX-FileCopyrightText: 2009-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 #include <Akonadi/CollectionPropertiesPage>
0009 namespace MailCommon
0010 {
0011 class CollectionTemplatesWidget;
0012 }
0013 class CollectionTemplatesPage : public Akonadi::CollectionPropertiesPage
0014 {
0015     Q_OBJECT
0016 public:
0017     explicit CollectionTemplatesPage(QWidget *parent = nullptr);
0018     ~CollectionTemplatesPage() override;
0019 
0020     void load(const Akonadi::Collection &col) override;
0021     void save(Akonadi::Collection &col) override;
0022     [[nodiscard]] bool canHandle(const Akonadi::Collection &collection) const override;
0023 
0024 private:
0025     void init();
0026     MailCommon::CollectionTemplatesWidget *const mCollectionTemplateWidget;
0027 };
0028 
0029 AKONADI_COLLECTION_PROPERTIES_PAGE_FACTORY(CollectionTemplatesPageFactory, CollectionTemplatesPage)