1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : undo actions manager for image editor.
9
* Copyright (C) 2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
10
* Copyright (C) 2005 by Joern Ahrens <joern.ahrens@kdemail.net>
12
* This program is free software; you can redistribute it
13
* and/or modify it under the terms of the GNU General
14
* Public License as published by the Free Software Foundation;
15
* either version 2, or (at your option)
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
23
* ============================================================ */
34
#include "digikam_export.h"
41
class DIGIKAM_EXPORT UndoAction
46
UndoAction(DImgInterface* iface);
47
virtual ~UndoAction();
49
virtual void rollBack() = 0;
50
virtual void execute() = 0;
52
QString getTitle() const;
56
DImgInterface *m_iface;
60
class DIGIKAM_EXPORT UndoActionRotate : public UndoAction
72
UndoActionRotate(DImgInterface* iface, Angle angle);
83
class DIGIKAM_EXPORT UndoActionFlip : public UndoAction
94
UndoActionFlip(DImgInterface* iface, Direction dir);
105
class DIGIKAM_EXPORT UndoActionBCG : public UndoAction
110
UndoActionBCG(DImgInterface* iface,
111
double oldGamma, double oldBrightness,
112
double oldContrast, double newGamma,
113
double newBrightness, double newContrast);
122
double m_oldBrightness;
123
double m_oldContrast;
125
double m_newBrightness;
126
double m_newContrast;
129
class DIGIKAM_EXPORT UndoActionIrreversible : public UndoAction
134
UndoActionIrreversible(DImgInterface* iface,
135
const QString &caller=i18n("Unknown"));
136
~UndoActionIrreversible();
142
} // namespace Digikam
144
#endif /* UNDOACTION_H */