digiKam
importsettings.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 : 2012-07-15
7  * Description : Settings for the import tool
8  *
9  * Copyright (C) 2012 by Islam Wazery <wazery at ubuntu dot com>
10  * Copyright (C) 2012-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_IMPORT_SETTINGS_H
26 #define DIGIKAM_IMPORT_SETTINGS_H
27 
28 // Qt includes
29 
30 #include <QObject>
31 #include <QFont>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 
37 namespace Digikam
38 {
39 
40 class DIGIKAM_GUI_EXPORT ImportSettings : public QObject
41 {
42  Q_OBJECT
43 
44 public:
45 
47  {
48  ShowPreview = 0,
50  OpenDefault
51  };
52 
53 Q_SIGNALS:
54 
55  void setupChanged();
56 
57 public:
58 
59  static ImportSettings* instance();
60 
61  void readSettings();
62  void saveSettings();
63 
64  void emitSetupChanged();
65 
66  bool showToolTipsIsValid() const;
67 
68  void setShowThumbbar(bool val);
69  bool getShowThumbbar() const;
70 
71  void setPreviewLoadFullImageSize(bool val);
72  bool getPreviewLoadFullImageSize() const;
73 
74  void setPreviewItemsWhileDownload(bool val);
75  bool getPreviewItemsWhileDownload() const;
76 
77  void setPreviewShowIcons(bool val);
78  bool getPreviewShowIcons() const;
79 
80  void setImageSortOrder(int order);
81  int getImageSortOrder() const;
82 
83  void setImageSortBy(int sortBy);
84  int getImageSortBy() const;
85 
86  void setImageSeparationMode(int mode);
87  int getImageSeparationMode() const;
88 
89  void setItemLeftClickAction(int action);
90  int getItemLeftClickAction() const;
91 
92  void setDefaultIconSize(int val);
93  int getDefaultIconSize() const;
94 
95  void setIconViewFont(const QFont& font);
96  QFont getIconViewFont() const;
97 
98  void setIconShowName(bool val);
99  bool getIconShowName() const;
100 
101  void setIconShowSize(bool val);
102  bool getIconShowSize() const;
103 
104  void setIconShowTitle(bool val);
105  bool getIconShowTitle() const;
106 
107  void setIconShowTags(bool val);
108  bool getIconShowTags() const;
109 
110  void setIconShowDate(bool val);
111  bool getIconShowDate() const;
112 
113  void setIconShowRating(bool val);
114  bool getIconShowRating() const;
115 
116  void setIconShowImageFormat(bool val);
117  bool getIconShowImageFormat() const;
118 
119  void setIconShowCoordinates(bool val);
120  bool getIconShowCoordinates() const;
121 
122  void setIconShowOverlays(bool val);
123  bool getIconShowOverlays() const;
124 
125  void setToolTipsFont(const QFont& font);
126  QFont getToolTipsFont() const;
127 
128  void setShowToolTips(bool val);
129  bool getShowToolTips() const;
130 
131  void setToolTipsShowFileName(bool val);
132  bool getToolTipsShowFileName() const;
133 
134  void setToolTipsShowFileDate(bool val);
135  bool getToolTipsShowFileDate() const;
136 
137  void setToolTipsShowFileSize(bool val);
138  bool getToolTipsShowFileSize() const;
139 
140  void setToolTipsShowImageType(bool val);
141  bool getToolTipsShowImageType() const;
142 
143  void setToolTipsShowImageDim(bool val);
144  bool getToolTipsShowImageDim() const;
145 
146  void setToolTipsShowPhotoMake(bool val);
147  bool getToolTipsShowPhotoMake() const;
148 
149  void setToolTipsShowPhotoLens(bool val);
150  bool getToolTipsShowPhotoLens() const;
151 
152  void setToolTipsShowPhotoFocal(bool val);
153  bool getToolTipsShowPhotoFocal() const;
154 
155  void setToolTipsShowPhotoExpo(bool val);
156  bool getToolTipsShowPhotoExpo() const;
157 
158  void setToolTipsShowPhotoFlash(bool val);
159  bool getToolTipsShowPhotoFlash() const;
160 
161  void setToolTipsShowPhotoWB(bool val);
162  bool getToolTipsShowPhotoWB() const;
163 
164  void setToolTipsShowTags(bool val);
165  bool getToolTipsShowTags() const;
166 
167  void setToolTipsShowLabelRating(bool val);
168  bool getToolTipsShowLabelRating() const;
169 
170 private:
171 
172  // Disable;
173  explicit ImportSettings(QObject*) = delete;
174 
175  ImportSettings();
176  ~ImportSettings() override;
177 
178 private:
179 
180  void init();
181 
182 private:
183 
184  class Private;
185  Private* const d;
186 
187  friend class ImportSettingsCreator;
188 };
189 
190 } // namespace Digikam
191 
192 #endif // DIGIKAM_IMPORT_SETTINGS_H
Definition: importsettings.h:41
ItemLeftClickAction
Definition: importsettings.h:47
@ StartEditor
Definition: importsettings.h:49
Definition: datefolderview.cpp:43