collectiontemplatespage.h 997 Bytes
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
/*
2
   SPDX-FileCopyrightText: 2009-2020 Laurent Montel <montel@kde.org>
3

4
   SPDX-License-Identifier: GPL-2.0-or-later
5
6
7
8
*/

#ifndef COLLECTIONTEMPLATESPAGE_H
#define COLLECTIONTEMPLATESPAGE_H
Laurent Montel's avatar
Laurent Montel committed
9
#include <AkonadiWidgets/collectionpropertiespage.h>
10
namespace MailCommon {
Laurent Montel's avatar
Laurent Montel committed
11
class CollectionTemplatesWidget;
12
}
Laurent Montel's avatar
Laurent Montel committed
13
template<typename T> class QSharedPointer;
14

15
16
class CollectionTemplatesPage : public Akonadi::CollectionPropertiesPage
{
Laurent Montel's avatar
Laurent Montel committed
17
    Q_OBJECT
18
public:
Laurent Montel's avatar
Laurent Montel committed
19
    explicit CollectionTemplatesPage(QWidget *parent = nullptr);
Laurent Montel's avatar
Laurent Montel committed
20
    ~CollectionTemplatesPage() override;
21

22
23
    void load(const Akonadi::Collection &col) override;
    void save(Akonadi::Collection &col) override;
Laurent Montel's avatar
Laurent Montel committed
24
    Q_REQUIRED_RESULT bool canHandle(const Akonadi::Collection &collection) const override;
25

Laurent Montel's avatar
Laurent Montel committed
26
private:
Laurent Montel's avatar
Laurent Montel committed
27
    void init();
28
    MailCommon::CollectionTemplatesWidget *mCollectionTemplateWidget = nullptr;
29
30
};

Laurent Montel's avatar
Laurent Montel committed
31
AKONADI_COLLECTION_PROPERTIES_PAGE_FACTORY(CollectionTemplatesPageFactory, CollectionTemplatesPage)
32

33
#endif /* COLLECTIONTEMPLATESPAGE_H */