2 This file is part of KMail
4 Copyright (C) 1999 Waldo Bastian (bastian@kde.org)
5 Copyright (c) 2003 Zack Rusin <zack@kde.org>
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 version 2 as published by the Free Software Foundation.
11 This software is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this library; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
27 #include <AkonadiCore/collection.h>
28 #include <AkonadiCore/item.h>
34 /** A class for storing Undo information. */
45 Akonadi::Item::List items
;
46 Akonadi::Collection srcFolder
;
47 Akonadi::Collection destFolder
;
51 class UndoStack
: public QObject
56 explicit UndoStack(int size
);
61 int newUndoAction(const Akonadi::Collection
&srcFolder
, const Akonadi::Collection
&destFolder
);
62 void addMsgToAction(int undoId
, const Akonadi::Item
&item
);
66 void pushSingleAction(const Akonadi::Item
&item
, const Akonadi::Collection
&, const Akonadi::Collection
&destFolder
);
67 void folderDestroyed(const Akonadi::Collection
&folder
);
69 QString
undoInfo() const;
72 void slotMoveResult(KJob
*);
75 QList
<UndoInfo
*> mStack
;
78 UndoInfo
*mCachedInfo
;
81 void undoStackChanged();