Mailcommon

foldercollectionmonitor.h
1 /*
2  SPDX-FileCopyrightText: 2009-2022 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "mailcommon_export.h"
10 
11 #include <KIO/Job>
12 #include <KSharedConfig>
13 
14 #include <QModelIndex>
15 #include <QObject>
16 
17 class QAbstractItemModel;
18 
19 namespace Akonadi
20 {
21 class ChangeRecorder;
22 class Collection;
23 class Session;
24 }
25 
26 namespace MailCommon
27 {
28 class FolderCollectionMonitorPrivate;
29 /**
30  * @brief The FolderCollectionMonitor class
31  * @author Laurent Montel <[email protected]>
32  */
33 class MAILCOMMON_EXPORT FolderCollectionMonitor : public QObject
34 {
35  Q_OBJECT
36 
37 public:
38  explicit FolderCollectionMonitor(Akonadi::Session *session, QObject *parent = nullptr);
39  ~FolderCollectionMonitor() override;
40 
41  Q_REQUIRED_RESULT Akonadi::ChangeRecorder *monitor() const;
42  void expireAllFolders(bool immediate, QAbstractItemModel *collectionModel);
43  void expunge(const Akonadi::Collection &, bool sync = false);
44 
45 protected:
46  void expireAllCollection(const QAbstractItemModel *model, bool immediate, const QModelIndex &parentIndex = QModelIndex());
47 
48 private:
49  void slotDeleteJob(KJob *job);
50  std::unique_ptr<FolderCollectionMonitorPrivate> const d;
51 };
52 }
The FolderCollectionMonitor 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:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.