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

0001 /*
0002  *
0003  * SPDX-FileCopyrightText: 2006 Till Adam <adam@kde.org>
0004  * SPDX-FileCopyrightText: 2009-2024 Laurent Montel <montel@kde.org>
0005  *
0006  * SPDX-License-Identifier: GPL-2.0-only
0007  */
0008 
0009 #pragma once
0010 #include <Akonadi/CollectionPropertiesPage>
0011 
0012 class CollectionQuotaWidget;
0013 
0014 /**
0015  * "Quota" tab in the folder dialog
0016  */
0017 class CollectionQuotaPage : public Akonadi::CollectionPropertiesPage
0018 {
0019     Q_OBJECT
0020 public:
0021     explicit CollectionQuotaPage(QWidget *parent = nullptr);
0022     void load(const Akonadi::Collection &col) override;
0023     void save(Akonadi::Collection &col) override;
0024     [[nodiscard]] bool canHandle(const Akonadi::Collection &collection) const override;
0025 
0026 private:
0027     void init();
0028     CollectionQuotaWidget *const mQuotaWidget;
0029 };
0030 
0031 AKONADI_COLLECTION_PROPERTIES_PAGE_FACTORY(CollectionQuotaPageFactory, CollectionQuotaPage)