• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
  • kmime
movetotrashcommand_p.h
1/*
2 Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
3 Copyright (c) 2010 Andras Mantia <andras@kdab.com>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*/
19
20#ifndef MOVETOTRASHCOMMAND_H
21#define MOVETOTRASHCOMMAND_H
22
23#include "commandbase_p.h"
24
25#include <akonadi/collection.h>
26#include <akonadi/item.h>
27
28#include <QList>
29
30class QAbstractItemModel;
31class KJob;
32class MoveToTrashCommand : public CommandBase
33{
34 Q_OBJECT
35public:
36 MoveToTrashCommand(const QAbstractItemModel *model, const QList< Akonadi::Item > &msgList, QObject *parent = 0);
37 MoveToTrashCommand(const QAbstractItemModel *model, const Akonadi::Collection::List &folders, QObject *parent = 0);
38
39 /*reimp*/ void execute();
40
41private Q_SLOTS:
42 void slotFetchDone(KJob *job);
43 void slotMoveDone(const Result &result);
44
45private:
46 void moveMessages();
47 Akonadi::Collection trashCollectionFromResource(const Akonadi::Collection &col);
48 Akonadi::Collection trashCollectionFolder();
49 Akonadi::Collection findTrashFolder(const Akonadi::Collection &folder);
50 Akonadi::Collection collectionFromId(const Akonadi::Collection::Id &id) const;
51
52 Akonadi::Collection::List mFolders;
53 QList<Akonadi::Item> mMessages;
54 Akonadi::Collection::Id the_trashCollectionFolder;
55 const QAbstractItemModel *mModel;
56 int mFolderListJobCount;
57};
58
59#endif // MOVETOTRASHCOMMAND_H
Akonadi::Collection
Represents a collection of PIM items.
Definition: collection.h:76
Akonadi::Collection::List
QList< Collection > List
Describes a list of collections.
Definition: collection.h:81
Akonadi::Entity::Id
qint64 Id
Describes the unique id type.
Definition: entity.h:65
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal