File indexing completed on 2025-01-05 03:59:53

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2011-08-11
0007  * Description : a widget to customize album name created by
0008  *               camera interface.
0009  *
0010  * SPDX-FileCopyrightText: 2011-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_ALBUM_CUSTOMIZER_H
0017 #define DIGIKAM_ALBUM_CUSTOMIZER_H
0018 
0019 // Qt includes
0020 
0021 #include <QWidget>
0022 
0023 // Local includes
0024 
0025 #include "digikam_export.h"
0026 
0027 class KConfigGroup;
0028 
0029 namespace Digikam
0030 {
0031 
0032 class DIGIKAM_GUI_EXPORT AlbumCustomizer : public QWidget
0033 {
0034     Q_OBJECT
0035 
0036 public:
0037 
0038     enum DateFormatOptions
0039     {
0040         IsoDateFormat = 0,
0041         TextDateFormat,
0042         LocalDateFormat,
0043         CustomDateFormat
0044     };
0045 
0046 public:
0047 
0048     explicit AlbumCustomizer(QWidget* const parent = nullptr);
0049     ~AlbumCustomizer() override;
0050 
0051     void readSettings(KConfigGroup& group);
0052     void saveSettings(KConfigGroup& group);
0053 
0054     bool    autoAlbumDateEnabled()    const;
0055     bool    autoAlbumExtEnabled()     const;
0056     int     folderDateFormat()        const;
0057     bool    customDateFormatIsValid() const;
0058     QString customDateFormat()        const;
0059 
0060 private Q_SLOTS:
0061 
0062     void slotFolderDateFormatChanged(int);
0063     void slotToolTipButtonToggled(bool);
0064     void slotCustomizerChanged();
0065 
0066 private:
0067 
0068     class Private;
0069     Private* const d;
0070 };
0071 
0072 } // namespace Digikam
0073 
0074 #endif // DIGIKAM_ALBUM_CUSTOMIZER_H