Mailcommon

collectionexpirypage.h
1 /*
2  SPDX-FileCopyrightText: 2009-2022 Laurent Montel <[email protected]>
3  SPDX-FileCopyrightText: 2013 Jonathan Marten <[email protected]>
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
8 #pragma once
9 
10 #include "mailcommon_export.h"
11 
12 #include <Akonadi/Collection>
13 #include <Akonadi/CollectionPropertiesPage>
14 
15 namespace MailCommon
16 {
17 class CollectionExpiryWidget;
18 /**
19  * @brief The CollectionExpiryPage class
20  * @author Laurent Montel <[email protected]>
21  */
23 {
24  Q_OBJECT
25 
26 public:
27  explicit CollectionExpiryPage(QWidget *parent = nullptr);
28  ~CollectionExpiryPage() override;
29 
30  Q_REQUIRED_RESULT bool canHandle(const Akonadi::Collection &col) const override;
31  void load(const Akonadi::Collection &collection) override;
32  void save(Akonadi::Collection &collection) override;
33 
34 private:
35  void saveAndExpire(Akonadi::Collection &collection, bool saveSettings, bool _expirenow);
36  void init();
37  void slotChanged();
38  void slotSaveAndExpire();
39  void slotConfigChanged(bool changed);
40  CollectionExpiryWidget *mCollectionExpiryWidget = nullptr;
41  Akonadi::Collection mCollection;
42  bool mChanged = false;
43 };
44 
45 AKONADI_COLLECTION_PROPERTIES_PAGE_FACTORY(CollectionExpiryPageFactory, CollectionExpiryPage)
46 }
QCA_EXPORT void init()
The CollectionExpiryPage class.
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Oct 1 2022 04:00:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.