kmail

undostack.h
1/*
2 This file is part of KMail
3
4 Copyright (C) 1999 Waldo Bastian (bastian@kde.org)
5 Copyright (c) 2003 Zack Rusin <zack@kde.org>
6
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.
10
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.
15
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.
20*/
21
22#ifndef UNDOSTACK_H
23#define UNDOSTACK_H
24
25#include <tqptrlist.h>
26#include <tqstring.h>
27#include <tqobject.h>
28
29class KMFolder;
30class KMMsgBase;
31
32namespace KMail {
33
36{
37public:
38 int id;
39 TQValueList<ulong> serNums;
40 KMFolder *srcFolder;
41 KMFolder *destFolder;
42};
43
44class UndoStack : public TQObject
45{
46 TQ_OBJECT
47
48
49public:
50 UndoStack(int size);
51
52 void clear();
53 int size() const { return mStack.count(); }
54 int newUndoAction( KMFolder* srcFolder, KMFolder* destFolder );
55 void addMsgToAction( int undoId, ulong serNum );
56 void undo();
57
58 void pushSingleAction(ulong serNum, KMFolder *folder, KMFolder* destFolder);
59 void msgDestroyed( KMMsgBase *msg);
60 void folderDestroyed( KMFolder *folder);
61protected:
62 TQPtrList<UndoInfo> mStack;
63 int mSize;
64 int mLastId;
65 UndoInfo *mCachedInfo;
66
67signals:
68 void undoStackChanged();
69};
70
71}
72
73#endif
Mail folder.
Definition: kmfolder.h:69
A class for storing Undo information.
Definition: undostack.h:36
folderdiaquotatab.h
Definition: aboutdata.cpp:40