digiKam
undocache.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2005-02-05
7  * Description : undo cache manager for image editor.
8  *
9  * Copyright (C) 2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2005 by Joern Ahrens <joern dot ahrens at kdemail dot net>
11  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_UNDO_CACHE_H
27 #define DIGIKAM_UNDO_CACHE_H
28 
29 // Local includes
30 
31 #include "dimg.h"
32 #include "digikam_export.h"
33 
34 namespace Digikam
35 {
36 
37 class DIGIKAM_EXPORT UndoCache
38 {
39 
40 public:
41 
42  explicit UndoCache();
43  ~UndoCache();
44 
48  void clear();
49 
53  void clearFrom(int level);
54 
58  bool putData(int level, const DImg& img) const;
59 
63  DImg getData(int level) const;
64 
65 private:
66 
67  // Disable
68  UndoCache(const UndoCache&) = delete;
69  UndoCache& operator=(const UndoCache&) = delete;
70 
71 private:
72 
73  class Private;
74  Private* const d;
75 };
76 
77 } // namespace Digikam
78 
79 #endif // DIGIKAM_UNDO_CACHE_H
Definition: dimg.h:62
Definition: undocache.h:38
Definition: datefolderview.cpp:43