1 /* ============================================================ 2 * 3 * This file is a part of digiKam project 4 * https://www.digikam.org 5 * 6 * Date : 2018-07-30 7 * Description : a BQM plugin to adjust BCG 8 * 9 * Copyright (C) 2018-2021 by Gilles Caulier <caulier dot gilles at gmail dot com> 10 * 11 * This program is free software; you can redistribute it 12 * and/or modify it under the terms of the GNU General 13 * Public License as published by the Free Software Foundation; 14 * either version 2, or (at your option) any later version. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * ============================================================ */ 22 23 #include "bcgcorrectionplugin.h" 24 25 // Qt includes 26 27 #include <QPointer> 28 #include <QString> 29 #include <QApplication> 30 31 // KDE includes 32 33 #include <klocalizedstring.h> 34 35 // Local includes 36 37 #include "digikam_debug.h" 38 #include "bcgcorrection.h" 39 40 namespace DigikamBqmBCGCorrectionPlugin 41 { 42 BCGCorrectionPlugin(QObject * const parent)43BCGCorrectionPlugin::BCGCorrectionPlugin(QObject* const parent) 44 : DPluginBqm(parent) 45 { 46 } 47 ~BCGCorrectionPlugin()48BCGCorrectionPlugin::~BCGCorrectionPlugin() 49 { 50 } 51 name() const52QString BCGCorrectionPlugin::name() const 53 { 54 return i18n("BCG Correction"); 55 } 56 iid() const57QString BCGCorrectionPlugin::iid() const 58 { 59 return QLatin1String(DPLUGIN_IID); 60 } 61 icon() const62QIcon BCGCorrectionPlugin::icon() const 63 { 64 return QIcon::fromTheme(QLatin1String("contrast")); 65 } 66 description() const67QString BCGCorrectionPlugin::description() const 68 { 69 return i18n("A tool to fix Brightness / Contrast / Gamma"); 70 } 71 details() const72QString BCGCorrectionPlugin::details() const 73 { 74 return i18n("<p>This Batch Queue Manager tool can adjust Brightness / Contrast / Gamma from images.</p>"); 75 } 76 authors() const77QList<DPluginAuthor> BCGCorrectionPlugin::authors() const 78 { 79 return QList<DPluginAuthor>() 80 << DPluginAuthor(QString::fromUtf8("Gilles Caulier"), 81 QString::fromUtf8("caulier dot gilles at gmail dot com"), 82 QString::fromUtf8("(C) 2010-2021")) 83 ; 84 } 85 setup(QObject * const parent)86void BCGCorrectionPlugin::setup(QObject* const parent) 87 { 88 BCGCorrection* const tool = new BCGCorrection(parent); 89 tool->setPlugin(this); 90 91 addTool(tool); 92 } 93 94 } // namespace DigikamBqmBCGCorrectionPlugin 95