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

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2018-07-30
0007  * Description : plugin to create video slideshow.
0008  *
0009  * SPDX-FileCopyrightText: 2018-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 #include "videoslideshowplugin.h"
0016 
0017 // Qt includes
0018 
0019 #include <QPointer>
0020 
0021 // KDE includes
0022 
0023 #include <klocalizedstring.h>
0024 
0025 // Local includes
0026 
0027 #include "vidslidewizard.h"
0028 
0029 namespace DigikamGenericVideoSlideShowPlugin
0030 {
0031 
0032 VideoSlideShowPlugin::VideoSlideShowPlugin(QObject* const parent)
0033     : DPluginGeneric(parent)
0034 {
0035 }
0036 
0037 VideoSlideShowPlugin::~VideoSlideShowPlugin()
0038 {
0039 }
0040 
0041 QString VideoSlideShowPlugin::name() const
0042 {
0043     return i18n("Video Slideshow");
0044 }
0045 
0046 QString VideoSlideShowPlugin::iid() const
0047 {
0048     return QLatin1String(DPLUGIN_IID);
0049 }
0050 
0051 QIcon VideoSlideShowPlugin::icon() const
0052 {
0053     return QIcon::fromTheme(QLatin1String("media-record"));
0054 }
0055 
0056 QString VideoSlideShowPlugin::description() const
0057 {
0058     return i18n("A tool to create video slideshow from images");
0059 }
0060 
0061 QString VideoSlideShowPlugin::details() const
0062 {
0063     return i18n("<p>This tool allows users to back-process image as frame to create video slide-show.</p>"
0064                 "<p>Items to process can be selected one by one or by group through a selection of albums.</p>"
0065                 "<p>Different visual effects can be applied to images to make transitions while to render target video.</p>");
0066 }
0067 
0068 QString VideoSlideShowPlugin::handbookSection() const
0069 {
0070     return QLatin1String("post_processing");
0071 }
0072 
0073 QString VideoSlideShowPlugin::handbookChapter() const
0074 {
0075     return QLatin1String("video_slideshow");
0076 }
0077 
0078 QList<DPluginAuthor> VideoSlideShowPlugin::authors() const
0079 {
0080     return QList<DPluginAuthor>()
0081             << DPluginAuthor(QString::fromUtf8("A Janardhan Reddy"),
0082                              QString::fromUtf8("annapareddyjanardhanreddy at gmail dot com"),
0083                              QString::fromUtf8("(C) 2012"))
0084             << DPluginAuthor(QString::fromUtf8("Gilles Caulier"),
0085                              QString::fromUtf8("caulier dot gilles at gmail dot com"),
0086                              QString::fromUtf8("(C) 2012-2024"),
0087                              i18n("Author and Maintainer"))
0088             ;
0089 }
0090 
0091 void VideoSlideShowPlugin::setup(QObject* const parent)
0092 {
0093     DPluginAction* const ac = new DPluginAction(parent);
0094     ac->setIcon(icon());
0095     ac->setText(i18nc("@action", "Create video slideshow..."));
0096     ac->setObjectName(QLatin1String("videoslideshow"));
0097     ac->setActionCategory(DPluginAction::GenericTool);
0098 
0099     connect(ac, SIGNAL(triggered(bool)),
0100             this, SLOT(slotVideoSlideShow()));
0101 
0102     addAction(ac);
0103 }
0104 
0105 void VideoSlideShowPlugin::slotVideoSlideShow()
0106 {
0107     QPointer<VidSlideWizard> wzrd = new VidSlideWizard(nullptr, infoIface(sender()));
0108     wzrd->setPlugin(this);
0109     wzrd->exec();
0110     delete wzrd;
0111 }
0112 
0113 } // namespace DigikamGenericVideoSlideShowPlugin
0114 
0115 #include "moc_videoslideshowplugin.cpp"