Akonadi Mime

movetotrashcommand.h
1/*
2 SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>
3 SPDX-FileCopyrightText: 2010 Andras Mantia <andras@kdab.com>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#pragma once
9
10#include "commandbase.h"
11
12#include <Akonadi/Collection>
13#include <Akonadi/Item>
14
16class KJob;
17namespace Akonadi
18{
19class MoveToTrashCommand : public CommandBase
20{
22public:
23 MoveToTrashCommand(const QAbstractItemModel *model, const Akonadi::Item::List &msgList, QObject *parent = nullptr);
24 MoveToTrashCommand(const QAbstractItemModel *model, const Akonadi::Collection::List &folders, QObject *parent = nullptr);
25
26 void execute() override;
27
28private Q_SLOTS:
29 void slotMoveDone(Akonadi::CommandBase::Result result);
30
31private:
32 void slotFetchDone(KJob *job);
33 void moveMessages();
34 [[nodiscard]] Akonadi::Collection trashCollectionFromResource(const Akonadi::Collection &col);
35 [[nodiscard]] Akonadi::Collection trashCollectionFolder();
36 [[nodiscard]] Akonadi::Collection findTrashFolder(const Akonadi::Collection &folder);
37 [[nodiscard]] Akonadi::Collection collectionFromId(Collection::Id id) const;
38
40 Akonadi::Item::List mMessages;
41 Akonadi::Collection::Id the_trashCollectionFolder;
42 const QAbstractItemModel *mModel = nullptr;
43 int mFolderListJobCount = 0;
44};
45}
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.