| 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 add watermark |
| 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 "watermarkplugin.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 "watermark.h" |
| 31 |
|
| 32 |
namespace DigikamBqmWatermarkPlugin |
| 33 |
{ |
| 34 |
|
| 35 |
WaterMarkPlugin::WaterMarkPlugin(QObject* const parent) |
| 36 |
: DPluginBqm(parent) |
| 37 |
{ |
| 38 |
} |
| 39 |
|
| 40 |
QString WaterMarkPlugin::name() const |
| 41 |
{ |
| 42 |
return i18nc("@title", "Add Watermark"); |
| 43 |
} |
| 44 |
|
| 45 |
QString WaterMarkPlugin::iid() const |
| 46 |
{ |
| 47 |
return QLatin1String(DPLUGIN_IID); |
| 48 |
} |
| 49 |
|
| 50 |
QIcon WaterMarkPlugin::icon() const |
| 51 |
{ |
| 52 |
return QIcon::fromTheme(QLatin1String("insert-text")); |
| 53 |
} |
| 54 |
|
| 55 |
QString WaterMarkPlugin::description() const |
| 56 |
{ |
| 57 |
return i18nc("@info", "A tool to overlay an image or text as a visible watermark"); |
| 58 |
} |
| 59 |
|
| 60 |
QString WaterMarkPlugin::details() const |
| 61 |
{ |
| 62 |
return xi18nc("@info", "<para>This Batch Queue Manager tool can add a text watermark over images.</para>"); |
| 63 |
} |
| 64 |
|
| 65 |
QString WaterMarkPlugin::handbookSection() const |
| 66 |
{ |
| 67 |
return QLatin1String("batch_queue"); |
| 68 |
} |
| 69 |
|
| 70 |
QString WaterMarkPlugin::handbookChapter() const |
| 71 |
{ |
| 72 |
return QLatin1String("base_tools"); |
| 73 |
} |
| 74 |
|
| 75 |
QString WaterMarkPlugin::handbookReference() const |
| 76 |
{ |
| 77 |
return QLatin1String("bqm-decoratetools"); |
| 78 |
} |
| 79 |
|
| 80 |
QList<DPluginAuthor> WaterMarkPlugin::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 |
<< DPluginAuthor(QString::fromUtf8("Mikkel Baekhoej Christensen"), |
| 87 |
QString::fromUtf8("mbc at baekhoej dot dk"), |
| 88 |
QString::fromUtf8("(C) 2010")) |
| 89 |
<< DPluginAuthor(QString::fromUtf8("Ahmed Fathi"), |
| 90 |
QString::fromUtf8("ahmed dot fathi dot abdelmageed at gmail dot com"), |
| 91 |
QString::fromUtf8("(C) 2017")) |
| 92 |
; |
| 93 |
} |
| 94 |
|
| 95 |
void WaterMarkPlugin::setup(QObject* const parent) |
| 96 |
{ |
| 97 |
WaterMark* const tool = new WaterMark(parent); |
| 98 |
tool->setPlugin(this); |
| 99 |
|
| 100 |
addTool(tool); |
| 101 |
} |
| 102 |
|
| 103 |
} // namespace DigikamBqmWatermarkPlugin |
| 104 |
|
| 105 |
#include "moc_watermarkplugin.cpp" |