digiKam
showfotosettings.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 : 2013-12-20
7  * Description : Settings for Showfoto
8  *
9  * Copyright (C) 2013-2014 by Mohamed_Anwer <m_dot_anwer at gmx dot com>
10  * Copyright (C) 2013-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 SHOW_FOTO_SETTINGS_H
26 #define SHOW_FOTO_SETTINGS_H
27 
28 // Qt includes
29 
30 #include <QObject>
31 #include <QFont>
32 #include <QString>
33 
34 namespace ShowFoto
35 {
36 
37 class ShowfotoSettings : public QObject
38 {
39  Q_OBJECT
40 
41 public:
42 
43  static ShowfotoSettings* instance();
44 
45  void readSettings();
46  void syncConfig();
47 
48  // -- Misc. Settings ---------------------------------------
49 
50  QString getLastOpenedDir() const;
51  void setLastOpenedDir(const QString& dir);
52 
53  bool getDeleteItem2Trash() const;
54  void setDeleteItem2Trash(bool D2t);
55 
56  QString getCurrentTheme() const;
57  void setCurrentTheme(const QString& theme);
58 
59  int getRightSideBarStyle() const;
60  void setRightSideBarStyle(int style);
61 
62  int getUpdateType() const;
63  void setUpdateType(int type);
64 
65  bool getUpdateWithDebug() const;
66  void setUpdateWithDebug(bool dbg);
67 
68  QString getApplicationStyle() const;
69  void setApplicationStyle(const QString& style);
70 
71  QString getIconTheme() const;
72  void setIconTheme(const QString& theme);
73 
74  void setApplicationFont(const QFont& fnt);
75  QFont getApplicationFont() const;
76 
77  bool getShowFormatOverThumbnail() const;
78  void setShowFormatOverThumbnail(bool show);
79 
80  bool getShowCoordinates() const;
81  void setShowCoordinates(bool show);
82 
83  bool getShowSplash() const;
84  void setShowSplash(bool show);
85 
86  bool getNativeFileDialog() const;
87  void setNativeFileDialog(bool item);
88 
89  bool getItemCenter() const;
90  void setItemCenter(bool item);
91 
92  int getSortRole() const;
93  void setSortRole(int order);
94 
95  bool getReverseSort() const;
96  void setReverseSort(bool reverse);
97 
98  // -- ToolTip Settings --------------------------------------
99 
100  bool getShowToolTip() const;
101  void setShowToolTip(bool show);
102 
103  bool getShowFileName() const;
104  void setShowFileName(bool show);
105 
106  bool getShowFileDate() const;
107  void setShowFileDate(bool show);
108 
109  bool getShowFileSize() const;
110  void setShowFileSize(bool show);
111 
112  bool getShowFileType() const;
113  void setShowFileType(bool show);
114 
115  bool getShowFileDim() const;
116  void setShowFileDim(bool show);
117 
118  bool getShowPhotoMake() const;
119  void setShowPhotoMake(bool show);
120 
121  bool getShowPhotoLens() const;
122  void setShowPhotoLens(bool show);
123 
124  bool getShowPhotoFocal() const;
125  void setShowPhotoFocal(bool show);
126 
127  bool getShowPhotoExpo() const;
128  void setShowPhotoExpo(bool show);
129 
130  bool getShowPhotoFlash() const;
131  void setShowPhotoFlash(bool show);
132 
133  bool getShowPhotoWB() const;
134  void setShowPhotoWB(bool show);
135 
136  bool getShowPhotoDate() const;
137  void setShowPhotoDate(bool show);
138 
139  bool getShowPhotoMode() const;
140  void setShowPhotoMode(bool show);
141 
142  QFont getToolTipFont() const;
143  void setToolTipFont(const QFont& font);
144 
145 private:
146 
147  // Disable
149  explicit ShowfotoSettings(QObject*) = delete;
150  ~ShowfotoSettings() override;
151 
152 private:
153 
154  void init();
155 
156 private:
157 
158  class Private;
159  Private* const d;
160 
162 };
163 
164 } // namespace Showfoto
165 
166 #endif // SHOW_FOTO_SETTINGS_H
Definition: showfotosettings.h:38
bool getUpdateWithDebug() const
Definition: showfotosettings.cpp:369
int getSortRole() const
Definition: showfotosettings.cpp:419
static ShowfotoSettings * instance()
Definition: showfotosettings.cpp:219
bool getShowFormatOverThumbnail() const
Definition: showfotosettings.cpp:379
void setShowFileDate(bool show)
Definition: showfotosettings.cpp:514
QString getIconTheme() const
Definition: showfotosettings.cpp:394
QString getApplicationStyle() const
Definition: showfotosettings.cpp:389
QFont getApplicationFont() const
Definition: showfotosettings.cpp:399
void setSortRole(int order)
Definition: showfotosettings.cpp:662
void setShowPhotoMake(bool show)
Definition: showfotosettings.cpp:534
void setShowPhotoLens(bool show)
Definition: showfotosettings.cpp:539
void setUpdateType(int type)
Definition: showfotosettings.cpp:594
void setIconTheme(const QString &theme)
Definition: showfotosettings.cpp:621
bool getShowPhotoFocal() const
Definition: showfotosettings.cpp:469
QString getCurrentTheme() const
Definition: showfotosettings.cpp:359
void syncConfig()
Definition: showfotosettings.cpp:672
void setShowCoordinates(bool show)
Definition: showfotosettings.cpp:642
void setShowPhotoFocal(bool show)
Definition: showfotosettings.cpp:544
bool getShowSplash() const
Definition: showfotosettings.cpp:404
void setApplicationFont(const QFont &fnt)
Definition: showfotosettings.cpp:626
void readSettings()
Definition: showfotosettings.cpp:276
QFont getToolTipFont() const
Definition: showfotosettings.cpp:499
bool getShowFileType() const
Definition: showfotosettings.cpp:449
int getRightSideBarStyle() const
Definition: showfotosettings.cpp:374
friend class ShowfotoSettingsCreator
Definition: showfotosettings.h:161
QString getLastOpenedDir() const
Definition: showfotosettings.cpp:349
bool getShowToolTip() const
Definition: showfotosettings.cpp:429
void setShowFileName(bool show)
Definition: showfotosettings.cpp:509
void setShowFileDim(bool show)
Definition: showfotosettings.cpp:529
int getUpdateType() const
Definition: showfotosettings.cpp:364
bool getDeleteItem2Trash() const
Definition: showfotosettings.cpp:354
void setShowFileType(bool show)
Definition: showfotosettings.cpp:524
void setShowFormatOverThumbnail(bool show)
Definition: showfotosettings.cpp:637
bool getShowFileDim() const
Definition: showfotosettings.cpp:454
bool getShowFileSize() const
Definition: showfotosettings.cpp:444
void setDeleteItem2Trash(bool D2t)
Definition: showfotosettings.cpp:584
void setLastOpenedDir(const QString &dir)
Definition: showfotosettings.cpp:579
bool getShowFileDate() const
Definition: showfotosettings.cpp:439
bool getShowCoordinates() const
Definition: showfotosettings.cpp:384
void setNativeFileDialog(bool item)
Definition: showfotosettings.cpp:652
bool getShowPhotoWB() const
Definition: showfotosettings.cpp:484
void setItemCenter(bool item)
Definition: showfotosettings.cpp:657
void setReverseSort(bool reverse)
Definition: showfotosettings.cpp:667
void setToolTipFont(const QFont &font)
Definition: showfotosettings.cpp:574
bool getReverseSort() const
Definition: showfotosettings.cpp:424
void setShowFileSize(bool show)
Definition: showfotosettings.cpp:519
bool getShowPhotoMode() const
Definition: showfotosettings.cpp:494
void setShowToolTip(bool show)
Definition: showfotosettings.cpp:504
bool getNativeFileDialog() const
Definition: showfotosettings.cpp:409
void setApplicationStyle(const QString &style)
Definition: showfotosettings.cpp:609
void setShowPhotoFlash(bool show)
Definition: showfotosettings.cpp:554
void setCurrentTheme(const QString &theme)
Definition: showfotosettings.cpp:589
bool getShowFileName() const
Definition: showfotosettings.cpp:434
bool getShowPhotoExpo() const
Definition: showfotosettings.cpp:474
void setShowPhotoExpo(bool show)
Definition: showfotosettings.cpp:549
void setShowSplash(bool show)
Definition: showfotosettings.cpp:647
void setRightSideBarStyle(int style)
Definition: showfotosettings.cpp:604
void setShowPhotoDate(bool show)
Definition: showfotosettings.cpp:564
bool getShowPhotoMake() const
Definition: showfotosettings.cpp:459
bool getItemCenter() const
Definition: showfotosettings.cpp:414
void setShowPhotoWB(bool show)
Definition: showfotosettings.cpp:559
void setUpdateWithDebug(bool dbg)
Definition: showfotosettings.cpp:599
bool getShowPhotoLens() const
Definition: showfotosettings.cpp:464
void setShowPhotoMode(bool show)
Definition: showfotosettings.cpp:569
bool getShowPhotoFlash() const
Definition: showfotosettings.cpp:479
bool getShowPhotoDate() const
Definition: showfotosettings.cpp:489
Definition: showfotofolderviewbar.cpp:52