digiKam
advancedrenameprocessdialog.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 : 2010-11-14
7  * Description : process dialog for renaming files
8  *
9  * Copyright (C) 2010-2012 by Andi Clemens <andi dot clemens 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 DIGIKAM_ADVANCED_RENAME_PROCESS_DIALOG_H
25 #define DIGIKAM_ADVANCED_RENAME_PROCESS_DIALOG_H
26 
27 // Local includes
28 
29 #include "advancedrenamedialog.h"
30 #include "dprogressdlg.h"
31 #include "digikam_export.h"
32 
33 class QCloseEvent;
34 class QPixmap;
35 class QUrl;
36 
37 namespace Digikam
38 {
39 
40 class LoadingDescription;
41 
42 class DIGIKAM_GUI_EXPORT AdvancedRenameProcessDialog : public DProgressDlg
43 {
44  Q_OBJECT
45 
46 public:
47 
48  explicit AdvancedRenameProcessDialog(const NewNamesList& list, QWidget* const parent = nullptr);
49  ~AdvancedRenameProcessDialog() override;
50 
51  QList<QUrl> failedUrls() const;
52 
53 private:
54 
55  void abort();
56  void complete();
57  void processOne();
58  void getNextThumbnail();
59 
60 protected:
61 
62  void closeEvent(QCloseEvent* e) override;
63 
64 protected Q_SLOTS:
65 
66  void slotCancel();
67  void slotRenameFinished();
68  void slotRenameFailed(const QUrl& url);
69 
70 private Q_SLOTS:
71 
72  void slotRenameImages();
73  void slotGotThumbnail(const LoadingDescription& desc, const QPixmap& pix);
74 
75 private:
76 
77  // Disable
79  AdvancedRenameProcessDialog& operator=(const AdvancedRenameProcessDialog&) = delete;
80 
81 private:
82 
83  class Private;
84  Private* const d;
85 };
86 
87 } // namespace Digikam
88 
89 #endif // DIGIKAM_ADVANCED_RENAME_PROCESS_DIALOG_H
Definition: advancedrenameprocessdialog.h:43
Definition: dprogressdlg.h:40
Definition: loadingdescription.h:45
Definition: datefolderview.cpp:43