File indexing completed on 2025-03-09 03:57:08

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2010-11-14
0007  * Description : process dialog for renaming files
0008  *
0009  * SPDX-FileCopyrightText: 2010-2012 by Andi Clemens <andi dot clemens at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_ADVANCED_RENAME_PROCESS_DIALOG_H
0016 #define DIGIKAM_ADVANCED_RENAME_PROCESS_DIALOG_H
0017 
0018 // Local includes
0019 
0020 #include "advancedrenamedialog.h"
0021 #include "dprogressdlg.h"
0022 #include "digikam_export.h"
0023 
0024 class QCloseEvent;
0025 class QPixmap;
0026 class QUrl;
0027 
0028 namespace Digikam
0029 {
0030 
0031 class LoadingDescription;
0032 
0033 class DIGIKAM_GUI_EXPORT AdvancedRenameProcessDialog : public DProgressDlg
0034 {
0035     Q_OBJECT
0036 
0037 public:
0038 
0039     explicit AdvancedRenameProcessDialog(const NewNamesList& list, QWidget* const parent = nullptr);
0040     ~AdvancedRenameProcessDialog() override;
0041 
0042     QList<QUrl> failedUrls() const;
0043 
0044 private:
0045 
0046     void abort();
0047     void complete();
0048     void processOne();
0049     void getNextThumbnail();
0050 
0051 protected:
0052 
0053     void closeEvent(QCloseEvent* e) override;
0054 
0055 protected Q_SLOTS:
0056 
0057     void slotCancel();
0058     void slotRenameFinished();
0059     void slotRenameFailed(const QUrl& url);
0060 
0061 private Q_SLOTS:
0062 
0063     void slotRenameImages();
0064     void slotGotThumbnail(const LoadingDescription& desc, const QPixmap& pix);
0065 
0066 private:
0067 
0068     // Disable
0069     AdvancedRenameProcessDialog(const AdvancedRenameProcessDialog&)            = delete;
0070     AdvancedRenameProcessDialog& operator=(const AdvancedRenameProcessDialog&) = delete;
0071 
0072 private:
0073 
0074     class Private;
0075     Private* const d;
0076 };
0077 
0078 } // namespace Digikam
0079 
0080 #endif // DIGIKAM_ADVANCED_RENAME_PROCESS_DIALOG_H