digiKam
htmlthemepage.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_HTML_THEME_PAGE_H
24 #define DIGIKAM_HTML_THEME_PAGE_H
25 
26 // Qt includes
27 
28 #include <QListWidget>
29 #include <QTextBrowser>
30 #include <QWidget>
31 
32 // Local includes
33 
34 #include "dwizardpage.h"
35 #include "gallerytheme.h"
36 
37 using namespace Digikam;
38 
40 {
41 
42 class GalleryInfo;
43 
44 class ThemeListBoxItem : public QListWidgetItem
45 {
46 public:
47 
49  : QListWidgetItem(theme->name()),
50  m_theme (theme)
51  {
52  }
53 
54  ~ThemeListBoxItem() = default;
55 
56 public:
57 
59 
60 private:
61 
62  Q_DISABLE_COPY(ThemeListBoxItem)
63 };
64 
65 // ------------------------------------------------------------------------
66 
67 class HTMLThemePage : public DWizardPage
68 {
69  Q_OBJECT
70 
71 public:
72 
73  explicit HTMLThemePage(QWizard* const dialog, const QString& title);
74  ~HTMLThemePage() override;
75 
76  void initializePage() override;
77  bool validatePage() override;
78 
79  GalleryTheme::Ptr currentTheme() const;
80 
81 private Q_SLOTS:
82 
83  void slotThemeSelectionChanged();
84 
85 private:
86 
87  class Private;
88  Private* const d;
89 };
90 
91 } // namespace DigikamGenericHtmlGalleryPlugin
92 
93 #endif // DIGIKAM_HTML_THEME_PAGE_H
QSharedPointer< GalleryTheme > Ptr
Definition: gallerytheme.h:46
GalleryTheme::Ptr m_theme
Definition: htmlthemepage.h:58
ThemeListBoxItem(GalleryTheme::Ptr theme)
Definition: htmlthemepage.h:48
Definition: dwizardpage.h:42
Definition: galleryconfig.cpp:30
Definition: datefolderview.cpp:43