File indexing completed on 2025-01-05 03:53:15
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2018-07-30 0007 * Description : a plugin to create print compositions. 0008 * 0009 * SPDX-FileCopyrightText: 2018-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 "printcreatorplugin.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 "advprintwizard.h" 0028 0029 namespace DigikamGenericPrintCreatorPlugin 0030 { 0031 0032 PrintCreatorPlugin::PrintCreatorPlugin(QObject* const parent) 0033 : DPluginGeneric(parent) 0034 { 0035 } 0036 0037 PrintCreatorPlugin::~PrintCreatorPlugin() 0038 { 0039 } 0040 0041 QString PrintCreatorPlugin::name() const 0042 { 0043 return i18n("Print Creator"); 0044 } 0045 0046 QString PrintCreatorPlugin::iid() const 0047 { 0048 return QLatin1String(DPLUGIN_IID); 0049 } 0050 0051 QIcon PrintCreatorPlugin::icon() const 0052 { 0053 return QIcon::fromTheme(QLatin1String("document-print")); 0054 } 0055 0056 QString PrintCreatorPlugin::description() const 0057 { 0058 return i18n("A tool to create print composition from images"); 0059 } 0060 0061 QString PrintCreatorPlugin::details() const 0062 { 0063 return i18n("<p>This tool allows users to back-process items (as assemble) before to print.</p>" 0064 "<p>Items to process can be selected one by one or by group through a selection of albums.</p>" 0065 "<p>Different pre-defined paper sizes and layouts can be used to process files.</p>"); 0066 } 0067 0068 QString PrintCreatorPlugin::handbookSection() const 0069 { 0070 return QLatin1String("post_processing"); 0071 } 0072 0073 QString PrintCreatorPlugin::handbookChapter() const 0074 { 0075 return QLatin1String("print_creator"); 0076 } 0077 0078 QList<DPluginAuthor> PrintCreatorPlugin::authors() const 0079 { 0080 return QList<DPluginAuthor>() 0081 << DPluginAuthor(QString::fromUtf8("Todd Shoemaker"), 0082 QString::fromUtf8("todd at theshoemakers dot net"), 0083 QString::fromUtf8("(C) 2003-2004"), 0084 i18n("Author")) 0085 << DPluginAuthor(QString::fromUtf8("Angelo Naselli"), 0086 QString::fromUtf8("anaselli at linux dot it"), 0087 QString::fromUtf8("(C) 2007-2013")) 0088 << DPluginAuthor(QString::fromUtf8("Andreas Trink"), 0089 QString::fromUtf8("atrink at nociaro dot org"), 0090 QString::fromUtf8("(C) 2010"), 0091 i18n("Contributor")) 0092 << DPluginAuthor(QString::fromUtf8("Gilles Caulier"), 0093 QString::fromUtf8("caulier dot gilles at gmail dot com"), 0094 QString::fromUtf8("(C) 2004-2023"), 0095 i18n("Developer and Maintainer")) 0096 ; 0097 } 0098 0099 void PrintCreatorPlugin::setup(QObject* const parent) 0100 { 0101 DPluginAction* const ac = new DPluginAction(parent); 0102 ac->setIcon(icon()); 0103 ac->setText(i18nc("@action", "Print Creator...")); 0104 ac->setObjectName(QLatin1String("printcreator")); 0105 ac->setActionCategory(DPluginAction::GenericTool); 0106 0107 connect(ac, SIGNAL(triggered(bool)), 0108 this, SLOT(slotPrintCreator())); 0109 0110 addAction(ac); 0111 } 0112 0113 void PrintCreatorPlugin::slotPrintCreator() 0114 { 0115 QPointer<AdvPrintWizard> wzrd = new AdvPrintWizard(nullptr, infoIface(sender())); 0116 wzrd->setPlugin(this); 0117 wzrd->exec(); 0118 delete wzrd; 0119 } 0120 0121 } // namespace DigikamGenericPrintCreatorPlugin 0122 0123 #include "moc_printcreatorplugin.cpp"