File indexing completed on 2025-02-16 04:49:30
0001 /* 0002 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "checkbeforesendplugin.h" 0008 #include "checkbeforesendinterface.h" 0009 #include "configurewidget/checkbeforesendconfiguredialog.h" 0010 #include "configurewidget/checkbeforesendconfigurewidget.h" 0011 0012 #include <KPluginFactory> 0013 0014 K_PLUGIN_CLASS_WITH_JSON(CheckBeforeSendPlugin, "kmail_checkbeforesendplugin.json") 0015 0016 CheckBeforeSendPlugin::CheckBeforeSendPlugin(QObject *parent, const QList<QVariant> &) 0017 : MessageComposer::PluginEditorCheckBeforeSend(parent) 0018 { 0019 } 0020 0021 CheckBeforeSendPlugin::~CheckBeforeSendPlugin() = default; 0022 0023 MessageComposer::PluginEditorCheckBeforeSendInterface *CheckBeforeSendPlugin::createInterface(QObject *parent) 0024 { 0025 auto interface = new CheckBeforeSendInterface(parent); 0026 connect(this, &CheckBeforeSendPlugin::configChanged, interface, &CheckBeforeSendInterface::reloadConfig); 0027 return interface; 0028 } 0029 0030 bool CheckBeforeSendPlugin::hasConfigureDialog() const 0031 { 0032 return true; 0033 } 0034 0035 void CheckBeforeSendPlugin::showConfigureDialog(QWidget *parent) 0036 { 0037 CheckBeforeSendConfigureDialog dlg(parent); 0038 dlg.exec(); 0039 } 0040 0041 #include "checkbeforesendplugin.moc" 0042 0043 #include "moc_checkbeforesendplugin.cpp"