~ubuntu-branches/ubuntu/feisty/digikam/feisty

« back to all changes in this revision

Viewing changes to digikam/utilities/imageeditor/undoaction.h

  • Committer: Bazaar Package Importer
  • Author(s): Achim Bohnet
  • Date: 2005-03-10 02:39:02 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050310023902-023nymfst5mg696c
Tags: 0.7.2-2
* debian/TODO: clean
* digikam manpage: better --detect-camera description

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ============================================================
 
2
 * Author: Renchi Raju <renchi@pooh.tam.uiuc.edu>
 
3
 * Date  : 2005-02-06
 
4
 * Copyright 2005 by Renchi Raju
 
5
 *
 
6
 * This program is free software; you can redistribute it
 
7
 * and/or modify it under the terms of the GNU General
 
8
 * Public License as published by the Free Software Foundation;
 
9
 * either version 2, or (at your option)
 
10
 * any later version.
 
11
 * 
 
12
 * This program is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * GNU General Public License for more details.
 
16
 * ============================================================ */
 
17
 
 
18
#ifndef UNDOACTION_H
 
19
#define UNDOACTION_H
 
20
 
 
21
namespace Digikam
 
22
{
 
23
class ImlibInterface;
 
24
}
 
25
 
 
26
class UndoAction
 
27
{
 
28
public:
 
29
 
 
30
    UndoAction(Digikam::ImlibInterface* iface);
 
31
    virtual ~UndoAction();
 
32
 
 
33
    virtual void rollBack() = 0;
 
34
    
 
35
protected:
 
36
 
 
37
    Digikam::ImlibInterface* m_iface;
 
38
};
 
39
 
 
40
class UndoActionRotate : public UndoAction
 
41
{
 
42
public:
 
43
 
 
44
    enum Angle
 
45
    {
 
46
        R90,
 
47
        R180,
 
48
        R270
 
49
    };
 
50
    
 
51
    UndoActionRotate(Digikam::ImlibInterface* iface, Angle angle);
 
52
    ~UndoActionRotate();
 
53
 
 
54
    void rollBack();
 
55
 
 
56
private:
 
57
 
 
58
    int m_angle;
 
59
};
 
60
 
 
61
class UndoActionFlip : public UndoAction
 
62
{
 
63
public:
 
64
 
 
65
    enum Direction
 
66
    {
 
67
        Horizontal,
 
68
        Vertical
 
69
    };
 
70
    
 
71
    UndoActionFlip(Digikam::ImlibInterface* iface, Direction dir);
 
72
    ~UndoActionFlip();
 
73
 
 
74
    void rollBack();
 
75
 
 
76
private:
 
77
 
 
78
    int m_dir;
 
79
};
 
80
 
 
81
class UndoActionBCG : public UndoAction
 
82
{
 
83
public:
 
84
 
 
85
    UndoActionBCG(Digikam::ImlibInterface* iface,
 
86
                  double gamma, double brightness,
 
87
                  double contrast);
 
88
    ~UndoActionBCG();
 
89
 
 
90
    void rollBack();
 
91
    
 
92
private:
 
93
 
 
94
    double m_gamma;
 
95
    double m_brightness;
 
96
    double m_contrast;
 
97
};
 
98
 
 
99
class UndoActionIrreversible : public UndoAction
 
100
{
 
101
public:
 
102
 
 
103
    UndoActionIrreversible(Digikam::ImlibInterface* iface);
 
104
    ~UndoActionIrreversible();
 
105
 
 
106
    void rollBack();
 
107
};
 
108
 
 
109
#endif /* UNDOACTION_H */