Debian Codegraph @

core/dplugins/bqm/decorate/border/borderplugin.cpp

raw
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 border
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 "borderplugin.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 "border.h"
31
32 namespace DigikamBqmBorderPlugin
33 {
34
35 BorderPlugin::BorderPlugin(QObject* const parent)
36 : DPluginBqm(parent)
37 {
38 }
39
40 QString BorderPlugin::name() const
41 {
42 return i18nc("@title", "Add Border");
43 }
44
45 QString BorderPlugin::iid() const
46 {
47 return QLatin1String(DPLUGIN_IID);
48 }
49
50 QIcon BorderPlugin::icon() const
51 {
52 return QIcon::fromTheme(QLatin1String("bordertool"));
53 }
54
55 QString BorderPlugin::description() const
56 {
57 return i18nc("@info", "A tool to add a border around images");
58 }
59
60 QString BorderPlugin::details() const
61 {
62 return xi18nc("@info", "<para>This Batch Queue Manager tool can add decorative border around images.</para>");
63 }
64
65 QString BorderPlugin::handbookSection() const
66 {
67 return QLatin1String("batch_queue");
68 }
69
70 QString BorderPlugin::handbookChapter() const
71 {
72 return QLatin1String("base_tools");
73 }
74
75 QString BorderPlugin::handbookReference() const
76 {
77 return QLatin1String("bqm-decoratetools");
78 }
79
80 QList<DPluginAuthor> BorderPlugin::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) 2010-2024"))
86 ;
87 }
88
89 void BorderPlugin::setup(QObject* const parent)
90 {
91 Border* const tool = new Border(parent);
92 tool->setPlugin(this);
93
94 addTool(tool);
95 }
96
97 } // namespace DigikamBqmBorderPlugin
98
99 #include "moc_borderplugin.cpp"