digiKam
showfotofolderviewundo.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 : 2021-08-27
7  * Description : Showfoto folder view undo command.
8  *
9  * Copyright (C) 2021-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef SHOWFOTO_FOLDER_VIEW_UNDO_H
25 #define SHOWFOTO_FOLDER_VIEW_UNDO_H
26 
27 // Qt includes
28 
29 #include <QUndoCommand>
30 #include <QString>
31 
32 // Local includes
33 
35 
36 namespace ShowFoto
37 {
38 
39 class ShowfotoFolderViewUndo : public QUndoCommand
40 {
41 
42 public:
43 
45  const QString& newPath);
47 
48  QString undoPath() const;
49 
50  void undo();
51  void redo();
52 
53 private:
54 
55  class Private;
56  Private* const d;
57 };
58 
59 } // namespace ShowFoto
60 
61 #endif // SHOWFOTO_FOLDER_VIEW_UNDO_H
Definition: showfotofolderviewsidebar.h:52
Definition: showfotofolderviewundo.h:40
void redo()
Definition: showfotofolderviewundo.cpp:74
void undo()
Definition: showfotofolderviewundo.cpp:69
QString undoPath() const
Definition: showfotofolderviewundo.cpp:64
ShowfotoFolderViewUndo(ShowfotoFolderViewSideBar *const view, const QString &newPath)
Definition: showfotofolderviewundo.cpp:49
~ShowfotoFolderViewUndo()
Definition: showfotofolderviewundo.cpp:59
Definition: showfotofolderviewbar.cpp:52