File indexing completed on 2025-01-05 03:52:07
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2006-04-04 0007 * Description : a tool to generate HTML image galleries 0008 * 0009 * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_HTML_THEME_PAGE_H 0016 #define DIGIKAM_HTML_THEME_PAGE_H 0017 0018 // Qt includes 0019 0020 #include <QListWidget> 0021 #include <QTextBrowser> 0022 #include <QWidget> 0023 0024 // Local includes 0025 0026 #include "dwizardpage.h" 0027 #include "gallerytheme.h" 0028 0029 using namespace Digikam; 0030 0031 namespace DigikamGenericHtmlGalleryPlugin 0032 { 0033 0034 class GalleryInfo; 0035 0036 class ThemeListBoxItem : public QListWidgetItem 0037 { 0038 public: 0039 0040 explicit ThemeListBoxItem(GalleryTheme::Ptr theme) 0041 : QListWidgetItem(theme->name()), 0042 m_theme (theme) 0043 { 0044 } 0045 0046 ~ThemeListBoxItem() = default; 0047 0048 public: 0049 0050 GalleryTheme::Ptr m_theme; 0051 0052 private: 0053 0054 Q_DISABLE_COPY(ThemeListBoxItem) 0055 }; 0056 0057 // ------------------------------------------------------------------------ 0058 0059 class HTMLThemePage : public DWizardPage 0060 { 0061 Q_OBJECT 0062 0063 public: 0064 0065 explicit HTMLThemePage(QWizard* const dialog, const QString& title); 0066 ~HTMLThemePage() override; 0067 0068 void initializePage() override; 0069 bool validatePage() override; 0070 0071 GalleryTheme::Ptr currentTheme() const; 0072 0073 private Q_SLOTS: 0074 0075 void slotThemeSelectionChanged(); 0076 0077 private: 0078 0079 class Private; 0080 Private* const d; 0081 }; 0082 0083 } // namespace DigikamGenericHtmlGalleryPlugin 0084 0085 #endif // DIGIKAM_HTML_THEME_PAGE_H