akonadi/kmime
movetotrashcommand_p.h
00001 /* 00002 Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com 00003 Copyright (c) 2010 Andras Mantia <andras@kdab.com> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 */ 00019 00020 00021 #ifndef MOVETOTRASHCOMMAND_H 00022 #define MOVETOTRASHCOMMAND_H 00023 00024 #include "commandbase_p.h" 00025 00026 #include <akonadi/collection.h> 00027 #include <akonadi/item.h> 00028 00029 #include <QList> 00030 00031 class QAbstractItemModel; 00032 class KJob; 00033 class MoveToTrashCommand : public CommandBase 00034 { 00035 Q_OBJECT 00036 public: 00037 MoveToTrashCommand( const QAbstractItemModel* model, const QList< Akonadi::Item >& msgList, QObject* parent = 0 ); 00038 MoveToTrashCommand( const QAbstractItemModel* model, const Akonadi::Collection::List& folders, QObject* parent = 0 ); 00039 00040 /*reimp*/ void execute(); 00041 00042 private Q_SLOTS: 00043 void slotFetchDone( KJob* job ); 00044 void slotMoveDone( const Result &result); 00045 00046 private: 00047 void moveMessages(); 00048 Akonadi::Collection trashCollectionFromResource( const Akonadi::Collection & col ); 00049 Akonadi::Collection trashCollectionFolder(); 00050 Akonadi::Collection findTrashFolder( const Akonadi::Collection& folder ); 00051 Akonadi::Collection collectionFromId(const Akonadi::Collection::Id& id) const; 00052 00053 Akonadi::Collection::List mFolders; 00054 QList<Akonadi::Item> mMessages; 00055 Akonadi::Collection::Id the_trashCollectionFolder; 00056 const QAbstractItemModel* mModel; 00057 int mFolderListJobCount; 00058 }; 00059 00060 #endif // MOVETOTRASHCOMMAND_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:09:59 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:09:59 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.