File indexing completed on 2025-03-09 03:52:10

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2018-07-30
0007  * Description : a plugin to render slideshow.
0008  *
0009  * SPDX-FileCopyrightText: 2018-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2020      by Minh Nghia Duong <minhnghiaduong997 at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_SLIDESHOW_PLUGIN_H
0017 #define DIGIKAM_SLIDESHOW_PLUGIN_H
0018 
0019 // Local includes
0020 
0021 #include "dplugingeneric.h"
0022 #include "iteminfolist.h"
0023 
0024 #define DPLUGIN_IID "org.kde.digikam.plugin.generic.SlideShow"
0025 
0026 using namespace Digikam;
0027 
0028 namespace DigikamGenericSlideShowPlugin
0029 {
0030 
0031 class SlideShowSettings;
0032 
0033 class SlideShowPlugin : public DPluginGeneric
0034 {
0035     Q_OBJECT
0036     Q_PLUGIN_METADATA(IID DPLUGIN_IID)
0037     Q_INTERFACES(Digikam::DPluginGeneric)
0038 
0039 public:
0040 
0041     explicit SlideShowPlugin(QObject* const parent = nullptr);
0042     ~SlideShowPlugin()                   override;
0043 
0044     QString name()                 const override;
0045     QString iid()                  const override;
0046     QIcon   icon()                 const override;
0047     QString details()              const override;
0048     QString description()          const override;
0049     QList<DPluginAuthor> authors() const override;
0050     QString handbookSection()      const override;
0051     QString handbookChapter()      const override;
0052 
0053     void setup(QObject* const)           override;
0054 
0055     void addConnectionSlideEnd(QObject* const obj);
0056 
0057 private Q_SLOTS:
0058 
0059     void slotMenuSlideShow();
0060     void slotMenuSlideShowAll();
0061     void slotMenuSlideShowSelection();
0062     void slotMenuSlideShowRecursive();
0063     void slotShowRecursive(const QList<QUrl>& imageList);
0064     void slotShowManual();
0065 
0066 private:
0067 
0068     void slideshow(SlideShowSettings* const settings,
0069                    bool autoPlayEnabled = true,
0070                    const QUrl& startFrom = QUrl());
0071 };
0072 
0073 } // namespace DigikamGenericSlideShowPlugin
0074 
0075 #endif // DIGIKAM_SLIDESHOW_PLUGIN_H