File indexing completed on 2025-01-05 03:57:54

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2021-08-27
0007  * Description : Showfoto folder view undo command.
0008  *
0009  * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef SHOWFOTO_FOLDER_VIEW_UNDO_H
0016 #define SHOWFOTO_FOLDER_VIEW_UNDO_H
0017 
0018 // Qt includes
0019 
0020 #include <QUndoCommand>
0021 #include <QString>
0022 
0023 // Local includes
0024 
0025 #include "showfotofolderviewsidebar.h"
0026 
0027 namespace ShowFoto
0028 {
0029 
0030 class ShowfotoFolderViewUndo : public QUndoCommand
0031 {
0032 
0033 public:
0034 
0035     ShowfotoFolderViewUndo(ShowfotoFolderViewSideBar* const view,
0036                            const QString& newPath);
0037     ~ShowfotoFolderViewUndo();
0038 
0039     QString undoPath() const;
0040 
0041     void undo();
0042     void redo();
0043 
0044 private:
0045 
0046     class Private;
0047     Private* const d;
0048 };
0049 
0050 } // namespace ShowFoto
0051 
0052 #endif // SHOWFOTO_FOLDER_VIEW_UNDO_H