1
/* This file is part of the KDE project
2
Copyright (C) 2000, 2009 David Faure <faure@kde.org>
3
Copyright (C) 2002-2003 Alexander Kellett <lypanov@kde.org>
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License as
7
published by the Free Software Foundation; either version 2 of
8
the License, or (at your option) version 3.
10
This program 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
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>
19
#ifndef COMMANDHISTORY_H
20
#define COMMANDHISTORY_H
22
#include <kundostack.h>
25
class KActionCollection;
27
class CmdHistory : public QObject
31
CmdHistory(KActionCollection *collection);
32
virtual ~CmdHistory() {}
34
void notifyDocSaved();
37
void addCommand(QUndoCommand *);
39
// Adds command without executing it.
40
void addInFlightCommand(QUndoCommand *);
42
static CmdHistory *self();
49
void commandExecuted(const QUndoCommand *k);
52
// Ported from K3Command/K3CommandHistory to QUndoCommand/KUndoStack for KDE-4.4.0
53
KUndoStack m_commandHistory;
54
static CmdHistory *s_self;
57
#endif /* COMMANDHISTORY_H */