File indexing completed on 2025-01-19 03:59:22

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2012-07-15
0007  * Description : Settings for the import tool
0008  *
0009  * SPDX-FileCopyrightText: 2012      by Islam Wazery <wazery at ubuntu dot com>
0010  * SPDX-FileCopyrightText: 2012-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_IMPORT_SETTINGS_H
0017 #define DIGIKAM_IMPORT_SETTINGS_H
0018 
0019 // Qt includes
0020 
0021 #include <QObject>
0022 #include <QFont>
0023 
0024 // Local includes
0025 
0026 #include "digikam_export.h"
0027 
0028 namespace Digikam
0029 {
0030 
0031 class DIGIKAM_GUI_EXPORT ImportSettings : public QObject
0032 {
0033     Q_OBJECT
0034 
0035 public:
0036 
0037     enum ItemLeftClickAction
0038     {
0039         ShowPreview = 0,
0040         StartEditor,
0041         OpenDefault
0042     };
0043 
0044 Q_SIGNALS:
0045 
0046     void setupChanged();
0047 
0048 public:
0049 
0050     static ImportSettings* instance();
0051 
0052     void readSettings();
0053     void saveSettings();
0054 
0055     void emitSetupChanged();
0056 
0057     bool showToolTipsIsValid()              const;
0058 
0059     void setShowThumbbar(bool val);
0060     bool getShowThumbbar()                  const;
0061 
0062     void setPreviewLoadFullImageSize(bool val);
0063     bool getPreviewLoadFullImageSize()      const;
0064 
0065     void setPreviewItemsWhileDownload(bool val);
0066     bool getPreviewItemsWhileDownload()     const;
0067 
0068     void setPreviewShowIcons(bool val);
0069     bool getPreviewShowIcons()              const;
0070 
0071     void setImageSortOrder(int order);
0072     int  getImageSortOrder()                const;
0073 
0074     void setImageSortBy(int sortBy);
0075     int  getImageSortBy()                   const;
0076 
0077     void setImageSeparationMode(int mode);
0078     int  getImageSeparationMode()           const;
0079 
0080     void setItemLeftClickAction(int action);
0081     int  getItemLeftClickAction()           const;
0082 
0083     void setDefaultIconSize(int val);
0084     int  getDefaultIconSize()               const;
0085 
0086     void  setIconViewFont(const QFont& font);
0087     QFont getIconViewFont()                 const;
0088 
0089     void setIconShowName(bool val);
0090     bool getIconShowName()                  const;
0091 
0092     void setIconShowSize(bool val);
0093     bool getIconShowSize()                  const;
0094 
0095     void setIconShowTitle(bool val);
0096     bool getIconShowTitle()                 const;
0097 
0098     void setIconShowTags(bool val);
0099     bool getIconShowTags()                  const;
0100 
0101     void setIconShowDate(bool val);
0102     bool getIconShowDate()                  const;
0103 
0104     void setIconShowRating(bool val);
0105     bool getIconShowRating()                const;
0106 
0107     void setIconShowImageFormat(bool val);
0108     bool getIconShowImageFormat()           const;
0109 
0110     void setIconShowCoordinates(bool val);
0111     bool getIconShowCoordinates()           const;
0112 
0113     void setIconShowOverlays(bool val);
0114     bool getIconShowOverlays()              const;
0115 
0116     void  setToolTipsFont(const QFont& font);
0117     QFont getToolTipsFont()                 const;
0118 
0119     void setShowToolTips(bool val);
0120     bool getShowToolTips()                  const;
0121 
0122     void setToolTipsShowFileName(bool val);
0123     bool getToolTipsShowFileName()          const;
0124 
0125     void setToolTipsShowFileDate(bool val);
0126     bool getToolTipsShowFileDate()          const;
0127 
0128     void setToolTipsShowFileSize(bool val);
0129     bool getToolTipsShowFileSize()          const;
0130 
0131     void setToolTipsShowImageType(bool val);
0132     bool getToolTipsShowImageType()         const;
0133 
0134     void setToolTipsShowImageDim(bool val);
0135     bool getToolTipsShowImageDim()          const;
0136 
0137     void setToolTipsShowPhotoMake(bool val);
0138     bool getToolTipsShowPhotoMake()         const;
0139 
0140     void setToolTipsShowPhotoLens(bool val);
0141     bool getToolTipsShowPhotoLens()         const;
0142 
0143     void setToolTipsShowPhotoFocal(bool val);
0144     bool getToolTipsShowPhotoFocal()        const;
0145 
0146     void setToolTipsShowPhotoExpo(bool val);
0147     bool getToolTipsShowPhotoExpo()         const;
0148 
0149     void setToolTipsShowPhotoFlash(bool val);
0150     bool getToolTipsShowPhotoFlash()        const;
0151 
0152     void setToolTipsShowPhotoWB(bool val);
0153     bool getToolTipsShowPhotoWB()           const;
0154 
0155     void setToolTipsShowTags(bool val);
0156     bool getToolTipsShowTags()              const;
0157 
0158     void setToolTipsShowLabelRating(bool val);
0159     bool getToolTipsShowLabelRating()       const;
0160 
0161 private:
0162 
0163     // Disable;
0164     explicit ImportSettings(QObject*) = delete;
0165 
0166     ImportSettings();
0167     ~ImportSettings()                             override;
0168 
0169 private:
0170 
0171     void init();
0172 
0173 private:
0174 
0175     class Private;
0176     Private* const d;
0177 
0178     friend class ImportSettingsCreator;
0179 };
0180 
0181 } // namespace Digikam
0182 
0183 #endif // DIGIKAM_IMPORT_SETTINGS_H