File indexing completed on 2025-01-05 03:52:04

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: 2006-2010 by Aurelien Gateau <aurelien dot gateau at free dot fr>
0010  * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_GALLERY_THEME_H
0017 #define DIGIKAM_GALLERY_THEME_H
0018 
0019 // Qt includes
0020 
0021 #include <QString>
0022 #include <QList>
0023 #include <QSharedPointer>
0024 
0025 namespace DigikamGenericHtmlGalleryPlugin
0026 {
0027 
0028 class AbstractThemeParameter;
0029 
0030 /**
0031  * An HTML theme. This class gives access to the various theme properties,
0032  * including the theme parameters.
0033  */
0034 class GalleryTheme
0035 {
0036 public:
0037 
0038     typedef QSharedPointer<GalleryTheme>   Ptr;
0039     typedef QList<Ptr>                     List;
0040     typedef QList<AbstractThemeParameter*> ParameterList;
0041 
0042 public:
0043 
0044     ~GalleryTheme();
0045 
0046     // Internal theme name == name of theme folder
0047     QString internalName()          const;
0048     QString name()                  const;
0049     QString comment()               const;
0050 
0051     QString authorName()            const;
0052     QString authorUrl()             const;
0053 
0054     QString previewName()           const;
0055     QString previewUrl()            const;
0056     bool allowNonsquareThumbnails() const;
0057 
0058     /**
0059      * Theme directory on hard disk
0060      */
0061     QString directory()             const;
0062 
0063     ParameterList parameterList()   const;
0064 
0065     /**
0066      * Returns the list of available themes
0067      */
0068     static const List& getList();
0069     static Ptr findByInternalName(const QString& internalName);
0070 
0071 private:
0072 
0073     // Disable
0074     GalleryTheme();
0075     GalleryTheme(const GalleryTheme&)            = delete;
0076     GalleryTheme& operator=(const GalleryTheme&) = delete;
0077 
0078 private:
0079 
0080     class Private;
0081     Private* const d;
0082 };
0083 
0084 } // namespace DigikamGenericHtmlGalleryPlugin
0085 
0086 #endif // DIGIKAM_GALLERY_THEME_H