| 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 restore images |
| 8 |
* |
| 9 |
* SPDX-FileCopyrightText: 2018-2026 by Gilles Caulier <caulier dot gilles at gmail dot com> |
| 10 |
* |
| 11 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 12 |
* |
| 13 |
* ============================================================ */ |
| 14 |
|
| 15 |
#include "restorationplugin.h" |
| 16 |
|
| 17 |
// Qt includes |
| 18 |
|
| 19 |
#include <QPointer> |
| 20 |
#include <QString> |
| 21 |
#include <QApplication> |
| 22 |
|
| 23 |
// KDE includes |
| 24 |
|
| 25 |
#include <klocalizedstring.h> |
| 26 |
|
| 27 |
// Local includes |
| 28 |
|
| 29 |
#include "digikam_debug.h" |
| 30 |
#include "restoration.h" |
| 31 |
|
| 32 |
namespace DigikamBqmRestorationPlugin |
| 33 |
{ |
| 34 |
|
| 35 |
RestorationPlugin::RestorationPlugin(QObject* const parent) |
| 36 |
: DPluginBqm(parent) |
| 37 |
{ |
| 38 |
} |
| 39 |
|
| 40 |
QString RestorationPlugin::name() const |
| 41 |
{ |
| 42 |
return i18nc("@title", "Restoration"); |
| 43 |
} |
| 44 |
|
| 45 |
QString RestorationPlugin::iid() const |
| 46 |
{ |
| 47 |
return QLatin1String(DPLUGIN_IID); |
| 48 |
} |
| 49 |
|
| 50 |
QIcon RestorationPlugin::icon() const |
| 51 |
{ |
| 52 |
return QIcon::fromTheme(QLatin1String("restoration")); |
| 53 |
} |
| 54 |
|
| 55 |
QString RestorationPlugin::description() const |
| 56 |
{ |
| 57 |
return i18nc("@info", "A tool to restore images using Greystoration algorithm"); |
| 58 |
} |
| 59 |
|
| 60 |
QString RestorationPlugin::details() const |
| 61 |
{ |
| 62 |
return xi18nc("@info", "<para>This Batch Queue Manager tool can restore images using Greystoration algorithm.</para>"); |
| 63 |
} |
| 64 |
|
| 65 |
QString RestorationPlugin::handbookSection() const |
| 66 |
{ |
| 67 |
return QLatin1String("batch_queue"); |
| 68 |
} |
| 69 |
|
| 70 |
QString RestorationPlugin::handbookChapter() const |
| 71 |
{ |
| 72 |
return QLatin1String("base_tools"); |
| 73 |
} |
| 74 |
|
| 75 |
QString RestorationPlugin::handbookReference() const |
| 76 |
{ |
| 77 |
return QLatin1String("bqm-enhancetools"); |
| 78 |
} |
| 79 |
|
| 80 |
QList<DPluginAuthor> RestorationPlugin::authors() const |
| 81 |
{ |
| 82 |
return QList<DPluginAuthor>() |
| 83 |
<< DPluginAuthor(QString::fromUtf8("Gilles Caulier"), |
| 84 |
QString::fromUtf8("caulier dot gilles at gmail dot com"), |
| 85 |
QString::fromUtf8("(C) 2009-2024")) |
| 86 |
; |
| 87 |
} |
| 88 |
|
| 89 |
void RestorationPlugin::setup(QObject* const parent) |
| 90 |
{ |
| 91 |
Restoration* const tool = new Restoration(parent); |
| 92 |
tool->setPlugin(this); |
| 93 |
|
| 94 |
addTool(tool); |
| 95 |
} |
| 96 |
|
| 97 |
} // namespace DigikamBqmRestorationPlugin |
| 98 |
|
| 99 |
#include "moc_restorationplugin.cpp" |