File indexing completed on 2025-03-09 04:54:36

0001 /*
0002    SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "messageviewercheckbeforedeletinginterface.h"
0008 #include "messageviewercheckbeforedeletingparameters.h"
0009 
0010 #include <QAction>
0011 
0012 using namespace MessageViewer;
0013 
0014 class MessageViewer::MessageViewerCheckBeforeDeletingInterfacePrivate
0015 {
0016 public:
0017     MessageViewerCheckBeforeDeletingInterfacePrivate() = default;
0018 
0019     MessageViewer::MessageViewerCheckBeforeDeletingParameters parameters;
0020     QWidget *mParentWidget = nullptr;
0021 };
0022 
0023 MessageViewerCheckBeforeDeletingInterface::MessageViewerCheckBeforeDeletingInterface(QObject *parent)
0024     : QObject(parent)
0025     , d(new MessageViewer::MessageViewerCheckBeforeDeletingInterfacePrivate)
0026 {
0027 }
0028 
0029 MessageViewerCheckBeforeDeletingInterface::~MessageViewerCheckBeforeDeletingInterface() = default;
0030 
0031 void MessageViewerCheckBeforeDeletingInterface::setParentWidget(QWidget *parent)
0032 {
0033     d->mParentWidget = parent;
0034 }
0035 
0036 QWidget *MessageViewerCheckBeforeDeletingInterface::parentWidget() const
0037 {
0038     return d->mParentWidget;
0039 }
0040 
0041 void MessageViewerCheckBeforeDeletingInterface::reloadConfig()
0042 {
0043     // Reimplement it
0044 }
0045 
0046 void MessageViewerCheckBeforeDeletingInterface::setParameters(const MessageViewer::MessageViewerCheckBeforeDeletingParameters &params)
0047 {
0048     d->parameters = params;
0049 }
0050 
0051 MessageViewer::MessageViewerCheckBeforeDeletingParameters MessageViewerCheckBeforeDeletingInterface::parameters() const
0052 {
0053     return d->parameters;
0054 }
0055 
0056 QList<QAction *> MessageViewerCheckBeforeDeletingInterface::actions() const
0057 {
0058     // Reimplement in subclass
0059     return {};
0060 }
0061 
0062 void MessageViewerCheckBeforeDeletingInterface::createActions(KActionCollection *ac)
0063 {
0064     Q_UNUSED(ac);
0065 }
0066 
0067 #include "moc_messageviewercheckbeforedeletinginterface.cpp"