File indexing completed on 2025-01-05 03:59:54
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2004-09-19 0007 * Description : a options group to set renaming files 0008 * operations during camera downloading 0009 * 0010 * SPDX-FileCopyrightText: 2004-2005 by Renchi Raju <renchi dot raju at gmail dot com> 0011 * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0012 * SPDX-FileCopyrightText: 2011 by Andi Clemens <andi dot clemens at gmail dot com> 0013 * 0014 * SPDX-License-Identifier: GPL-2.0-or-later 0015 * 0016 * ============================================================ */ 0017 0018 #ifndef DIGIKAM_RENAME_CUSTOMIZER_H 0019 #define DIGIKAM_RENAME_CUSTOMIZER_H 0020 0021 // Qt includes 0022 0023 #include <QMap> 0024 #include <QWidget> 0025 0026 // Local includes 0027 0028 #include "digikam_export.h" 0029 0030 namespace Digikam 0031 { 0032 0033 class AdvancedRenameManager; 0034 0035 class DIGIKAM_GUI_EXPORT RenameCustomizer : public QWidget 0036 { 0037 Q_OBJECT 0038 0039 public: 0040 0041 enum Case 0042 { 0043 NONE = 0, 0044 UPPER, 0045 LOWER 0046 }; 0047 0048 public: 0049 0050 explicit RenameCustomizer(QWidget* const parent, const QString& cameraTitle); 0051 ~RenameCustomizer() override; 0052 0053 void setUseDefault(bool val); 0054 bool useDefault() const; 0055 QString newName(const QString& fileName) const; 0056 Case changeCase() const; 0057 void setChangeCase(Case val); 0058 0059 int startIndex() const; 0060 void setStartIndex(int startIndex); 0061 void reset(); 0062 0063 void setPreviewText(const QString& txt); 0064 0065 AdvancedRenameManager* renameManager() const; 0066 0067 Q_SIGNALS: 0068 0069 void signalChanged(); 0070 0071 private: 0072 0073 void readSettings(); 0074 void saveSettings(); 0075 0076 private Q_SLOTS: 0077 0078 void slotRadioButtonClicked(int); 0079 void slotRenameOptionsChanged(); 0080 void slotCustomRenameChanged(); 0081 0082 private: 0083 0084 class Private; 0085 Private* const d; 0086 }; 0087 0088 } // namespace Digikam 0089 0090 #endif // DIGIKAM_RENAME_CUSTOMIZER_H