File indexing completed on 2025-01-05 03:51:27
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2022-04-03 0007 * Description : a BQM plugin to convert to WEBP. 0008 * 0009 * SPDX-FileCopyrightText: 2022 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 "converttowebpplugin.h" 0016 0017 // Qt includes 0018 0019 #include <QPointer> 0020 #include <QString> 0021 #include <QApplication> 0022 0023 // KDE includes 0024 0025 #include <klocalizedstring.h> 0026 0027 // Local includes 0028 0029 #include "digikam_debug.h" 0030 #include "converttowebp.h" 0031 0032 namespace DigikamBqmConvertToWebpPlugin 0033 { 0034 0035 ConvertToWebpPlugin::ConvertToWebpPlugin(QObject* const parent) 0036 : DPluginBqm(parent) 0037 { 0038 } 0039 0040 ConvertToWebpPlugin::~ConvertToWebpPlugin() 0041 { 0042 } 0043 0044 QString ConvertToWebpPlugin::name() const 0045 { 0046 return i18nc("@title", "Convert To WEBP"); 0047 } 0048 0049 QString ConvertToWebpPlugin::iid() const 0050 { 0051 return QLatin1String(DPLUGIN_IID); 0052 } 0053 0054 QIcon ConvertToWebpPlugin::icon() const 0055 { 0056 return QIcon::fromTheme(QLatin1String("image-x-generic")); 0057 } 0058 0059 QString ConvertToWebpPlugin::description() const 0060 { 0061 return i18nc("@info", "A tool to convert images to WEBP format"); 0062 } 0063 0064 QString ConvertToWebpPlugin::details() const 0065 { 0066 return xi18nc("@info", "<para>This Batch Queue Manager tool can convert images data to WEBP format.</para>" 0067 "<para>WEBP is an image file format that Google has developed as a replacement for JPEG, PNG, and GIF file formats. WEBP yields files that are smaller for the same quality, or of higher quality for the same size. It supports both lossy and lossless compression, as well as animation and alpha transparency.</para>" 0068 "<para>See details about this format from <a href='https://en.wikipedia.org/wiki/WebP'>this page</a>.</para>"); 0069 } 0070 0071 QString ConvertToWebpPlugin::handbookSection() const 0072 { 0073 return QLatin1String("batch_queue"); 0074 } 0075 0076 QString ConvertToWebpPlugin::handbookChapter() const 0077 { 0078 return QLatin1String("base_tools"); 0079 } 0080 0081 QString ConvertToWebpPlugin::handbookReference() const 0082 { 0083 return QLatin1String("bqm-converttools"); 0084 } 0085 0086 QList<DPluginAuthor> ConvertToWebpPlugin::authors() const 0087 { 0088 return QList<DPluginAuthor>() 0089 << DPluginAuthor(QString::fromUtf8("Gilles Caulier"), 0090 QString::fromUtf8("caulier dot gilles at gmail dot com"), 0091 QString::fromUtf8("(C) 2022")) 0092 ; 0093 } 0094 0095 void ConvertToWebpPlugin::setup(QObject* const parent) 0096 { 0097 ConvertToWEBP* const tool = new ConvertToWEBP(parent); 0098 tool->setPlugin(this); 0099 0100 addTool(tool); 0101 } 0102 0103 } // namespace DigikamBqmConvertToWebpPlugin 0104 0105 #include "moc_converttowebpplugin.cpp"