digiKam
renamecustomizer.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 : 2004-09-19
7  * Description : a options group to set renaming files
8  * operations during camera downloading
9  *
10  * Copyright (C) 2004-2005 by Renchi Raju <renchi dot raju at gmail dot com>
11  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
12  * Copyright (C) 2011 by Andi Clemens <andi dot clemens at gmail dot com>
13  *
14  * This program is free software; you can redistribute it
15  * and/or modify it under the terms of the GNU General
16  * Public License as published by the Free Software Foundation;
17  * either version 2, or (at your option)
18  * any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * ============================================================ */
26 
27 #ifndef DIGIKAM_RENAME_CUSTOMIZER_H
28 #define DIGIKAM_RENAME_CUSTOMIZER_H
29 
30 // Qt includes
31 
32 #include <QMap>
33 #include <QRegExp>
34 #include <QWidget>
35 
36 // Local includes
37 
38 #include "digikam_export.h"
39 
40 namespace Digikam
41 {
42 
43 class AdvancedRenameManager;
44 
45 class DIGIKAM_GUI_EXPORT RenameCustomizer : public QWidget
46 {
47  Q_OBJECT
48 
49 public:
50 
51  enum Case
52  {
53  NONE = 0,
55  LOWER
56  };
57 
58 public:
59 
60  explicit RenameCustomizer(QWidget* const parent, const QString& cameraTitle);
61  ~RenameCustomizer() override;
62 
63  void setUseDefault(bool val);
64  bool useDefault() const;
65  QString newName(const QString& fileName) const;
66  Case changeCase() const;
67  void setChangeCase(Case val);
68 
69  int startIndex() const;
70  void setStartIndex(int startIndex);
71  void reset();
72 
73  AdvancedRenameManager* renameManager() const;
74 
75 Q_SIGNALS:
76 
77  void signalChanged();
78 
79 private:
80 
81  void readSettings();
82  void saveSettings();
83 
84 private Q_SLOTS:
85 
86  void slotRadioButtonClicked(int);
87  void slotRenameOptionsChanged();
88  void slotCustomRenameChanged();
89  void slotFileMetadataLinkUsed();
90 
91 private:
92 
93  class Private;
94  Private* const d;
95 };
96 
97 } // namespace Digikam
98 
99 #endif // DIGIKAM_RENAME_CUSTOMIZER_H
Definition: advancedrenamemanager.h:46
Definition: renamecustomizer.h:46
Case
Definition: renamecustomizer.h:52
@ UPPER
Definition: renamecustomizer.h:54
@ NONE
Definition: dngconverteractions.h:44
Definition: datefolderview.cpp:43