Akonadi

clearcachefoldersjob.h
1/*
2 This file is part of Akonadi
3
4 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8#pragma once
9
10#include "akonadiwidgets_export.h"
11#include <Akonadi/Collection>
12#include <QObject>
13namespace Akonadi
14{
15class AKONADIWIDGETS_EXPORT ClearCacheFoldersJob : public QObject
16{
17 Q_OBJECT
18public:
19 explicit ClearCacheFoldersJob(const Akonadi::Collection &folder, QObject *parent = nullptr);
20 explicit ClearCacheFoldersJob(const Akonadi::Collection::List &folders, QObject *parent = nullptr);
21 ~ClearCacheFoldersJob() override;
22
23 void start();
24
25 [[nodiscard]] bool canStart() const;
26
27 [[nodiscard]] QWidget *parentWidget() const;
28 void setParentWidget(QWidget *newParentWidget);
29
30 [[nodiscard]] bool canceled() const;
31 void setCanceled(bool newCanceled);
32
33Q_SIGNALS:
34 void clearCacheDone();
35 void clearNextFolder();
36 void finished(bool success);
37
38private:
39 void slotClearNextFolder();
40 Akonadi::Collection::List mCollections;
41 QWidget *mParentWidget = nullptr;
42 int mNumberJob = 0;
43 bool mCanceled = false;
44};
45}
Represents a collection of PIM items.
Definition collection.h:62
Q_SCRIPTABLE Q_NOREPLY void start()
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:31:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.