digiKam
galleryconfig.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 : 2006-04-04
7  * Description : a tool to generate HTML image galleries
8  *
9  * Copyright (C) 2012-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * ============================================================ */
22 
23 #ifndef DIGIKAM_GALLERY_CONFIG_H
24 #define DIGIKAM_GALLERY_CONFIG_H
25 
26 // Qt includes
27 
28 #include <QUrl>
29 #include <QString>
30 
31 // KDE includes
32 
33 #include <kconfigskeleton.h>
34 
36 {
37 
38 class GalleryConfig : public KConfigSkeleton
39 {
40  Q_OBJECT
41 
42 public:
43 
45  {
46  public:
47 
48  enum type
49  {
51  PNG,
52  COUNT
53  };
54  };
55 
57  {
58  public:
59 
60  enum type
61  {
63  PNG,
64  COUNT
65  };
66  };
67 
68  // Web Browser to use
70  {
71  NOBROWSER = 0,
74  COUNT
75  };
76 
77 public:
78 
79  explicit GalleryConfig(QObject* const parent = nullptr);
80  ~GalleryConfig() override;
81 
82  void setTheme(const QString&);
83  QString theme() const;
84 
87 
88  void setFullResize(bool);
89  bool fullResize() const;
90 
91  void setFullSize(int);
92  int fullSize() const;
93 
94  void setFullFormat(int);
95  int fullFormat() const;
96 
97  void setFullQuality(int);
98  int fullQuality() const;
99 
100  void setCopyOriginalImage(bool);
101  bool copyOriginalImage() const;
102 
103  void setThumbnailSize(int);
104  int thumbnailSize() const;
105 
106  void setThumbnailFormat(int);
107  int thumbnailFormat() const;
108 
109  void setThumbnailQuality(int);
110  int thumbnailQuality() const;
111 
112  void setThumbnailSquare(bool);
113  bool thumbnailSquare() const;
114 
115  void setDestUrl(const QUrl&);
116  QUrl destUrl() const;
117 
118  void setOpenInBrowser(int);
119  int openInBrowser() const;
120 
121  void setImageSelectionTitle(const QString&);
122  QString imageSelectionTitle() const;
123 
124 protected:
125 
126  QString m_theme;
137  QUrl m_destUrl;
139  QString m_imageSelectionTitle; // Gallery title to use for GalleryInfo::ImageGetOption::IMAGES selection.
140 };
141 
142 } // namespace DigikamGenericHtmlGalleryPlugin
143 
144 #endif // DIGIKAM_GALLERY_CONFIG_H
bool thumbnailSquare() const
Definition: galleryconfig.cpp:292
void setFullQuality(int)
Definition: galleryconfig.cpp:231
void setThumbnailQuality(int)
Definition: galleryconfig.cpp:275
int fullQuality() const
Definition: galleryconfig.cpp:237
int m_thumbnailSize
Definition: galleryconfig.h:133
void setThumbnailFormat(int)
Definition: galleryconfig.cpp:264
~GalleryConfig() override
Definition: galleryconfig.cpp:172
void setThumbnailSquare(bool)
Definition: galleryconfig.cpp:286
void setTheme(const QString &)
Definition: galleryconfig.cpp:176
QString imageSelectionTitle() const
Definition: galleryconfig.cpp:325
int m_openInBrowser
Definition: galleryconfig.h:138
void setImageSelectionTitle(const QString &)
Definition: galleryconfig.cpp:319
GalleryConfig(QObject *const parent=nullptr)
Definition: galleryconfig.cpp:32
void setThumbnailSize(int)
Definition: galleryconfig.cpp:253
int thumbnailQuality() const
Definition: galleryconfig.cpp:281
void setUseOriginalImageAsFullImage(bool)
Definition: galleryconfig.cpp:187
void setFullFormat(int)
Definition: galleryconfig.cpp:220
bool m_thumbnailSquare
Definition: galleryconfig.h:136
void setFullSize(int)
Definition: galleryconfig.cpp:209
int m_fullQuality
Definition: galleryconfig.h:131
QUrl destUrl() const
Definition: galleryconfig.cpp:303
QUrl m_destUrl
Definition: galleryconfig.h:137
int m_fullFormat
Definition: galleryconfig.h:130
int thumbnailFormat() const
Definition: galleryconfig.cpp:270
void setCopyOriginalImage(bool)
Definition: galleryconfig.cpp:242
int m_fullSize
Definition: galleryconfig.h:129
bool m_fullResize
Definition: galleryconfig.h:128
void setDestUrl(const QUrl &)
Definition: galleryconfig.cpp:297
bool m_copyOriginalImage
Definition: galleryconfig.h:132
QString m_imageSelectionTitle
Definition: galleryconfig.h:139
bool m_useOriginalImageAsFullImage
Definition: galleryconfig.h:127
void setOpenInBrowser(int)
Definition: galleryconfig.cpp:308
QString m_theme
Definition: galleryconfig.h:126
QString theme() const
Definition: galleryconfig.cpp:182
int fullSize() const
Definition: galleryconfig.cpp:215
bool copyOriginalImage() const
Definition: galleryconfig.cpp:248
EnumWebBrowser
Definition: galleryconfig.h:70
@ INTERNAL
Definition: galleryconfig.h:72
@ COUNT
Definition: galleryconfig.h:74
@ DESKTOP
Definition: galleryconfig.h:73
@ NOBROWSER
Definition: galleryconfig.h:71
int fullFormat() const
Definition: galleryconfig.cpp:226
int m_thumbnailFormat
Definition: galleryconfig.h:134
int openInBrowser() const
Definition: galleryconfig.cpp:314
int thumbnailSize() const
Definition: galleryconfig.cpp:259
void setFullResize(bool)
Definition: galleryconfig.cpp:198
bool fullResize() const
Definition: galleryconfig.cpp:204
int m_thumbnailQuality
Definition: galleryconfig.h:135
Definition: galleryconfig.cpp:30