File indexing completed on 2025-01-19 03:51:29
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2008-09-24 0007 * Description : a plugin to convert Raw files to DNG 0008 * 0009 * SPDX-FileCopyrightText: 2008-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 "dngconverterplugin.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 "dngconverterdialog.h" 0028 0029 namespace DigikamGenericDNGConverterPlugin 0030 { 0031 0032 DNGConverterPlugin::DNGConverterPlugin(QObject* const parent) 0033 : DPluginGeneric(parent) 0034 { 0035 } 0036 0037 DNGConverterPlugin::~DNGConverterPlugin() 0038 { 0039 } 0040 0041 QString DNGConverterPlugin::name() const 0042 { 0043 return i18nc("@title", "DNG Converter"); 0044 } 0045 0046 QString DNGConverterPlugin::iid() const 0047 { 0048 return QLatin1String(DPLUGIN_IID); 0049 } 0050 0051 QIcon DNGConverterPlugin::icon() const 0052 { 0053 return QIcon::fromTheme(QLatin1String("image-x-adobe-dng")); 0054 } 0055 0056 QString DNGConverterPlugin::description() const 0057 { 0058 return i18nc("@info", "A tool to batch convert RAW camera images to DNG"); 0059 } 0060 0061 QString DNGConverterPlugin::details() const 0062 { 0063 return i18nc("@info", "This Generic tool can convert RAW images data to DNG format.\n\n" 0064 "The Digital Negative is a lossless RAW image format created by Adobe.\n\n" 0065 "See details on this wikipedia entry about this format: %1", 0066 QLatin1String("<a href='https://en.wikipedia.org/wiki/Digital_Negative'>https://en.wikipedia.org/wiki/Digital_Negative</a>")); 0067 } 0068 0069 QString DNGConverterPlugin::handbookSection() const 0070 { 0071 return QLatin1String("showfoto_editor"); 0072 } 0073 0074 QString DNGConverterPlugin::handbookChapter() const 0075 { 0076 return QLatin1String("dng_converter"); 0077 } 0078 0079 QList<DPluginAuthor> DNGConverterPlugin::authors() const 0080 { 0081 return QList<DPluginAuthor>() 0082 << DPluginAuthor(QString::fromUtf8("Smit Mehta"), 0083 QString::fromUtf8("smit dot meh at gmail dot com"), 0084 QString::fromUtf8("(C) 2012")) 0085 << DPluginAuthor(QString::fromUtf8("Jens Mueller"), 0086 QString::fromUtf8("tschenser at gmx dot de"), 0087 QString::fromUtf8("(C) 2010-2011")) 0088 << DPluginAuthor(QString::fromUtf8("Gilles Caulier"), 0089 QString::fromUtf8("caulier dot gilles at gmail dot com"), 0090 QString::fromUtf8("(C) 2008-2021")) 0091 << DPluginAuthor(QString::fromUtf8("Maik Qualmann"), 0092 QString::fromUtf8("metzpinguin at gmail dot com"), 0093 QString::fromUtf8("(C) 2020-2021")) 0094 ; 0095 } 0096 0097 void DNGConverterPlugin::setup(QObject* const parent) 0098 { 0099 DPluginAction* const ac = new DPluginAction(parent); 0100 ac->setIcon(icon()); 0101 ac->setText(i18nc("@action", "DNG Converter...")); 0102 ac->setObjectName(QLatin1String("dngconverter")); 0103 ac->setActionCategory(DPluginAction::GenericTool); 0104 0105 connect(ac, SIGNAL(triggered(bool)), 0106 this, SLOT(slotDNGConverter())); 0107 0108 addAction(ac); 0109 } 0110 0111 void DNGConverterPlugin::slotDNGConverter() 0112 { 0113 QPointer<DNGConverterDialog> dialog = new DNGConverterDialog(nullptr, infoIface(sender())); 0114 dialog->setPlugin(this); 0115 dialog->exec(); 0116 delete dialog; 0117 } 0118 0119 } // namespace DigikamGenericDNGConverterPlugin 0120 0121 #include "moc_dngconverterplugin.cpp"