1 /*
2    SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
3 
4    SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "messageviewercheckbeforedeletinginterface.h"
8 #include "messageviewercheckbeforedeletingparameters.h"
9 
10 #include <QAction>
11 
12 using namespace MessageViewer;
13 
14 class MessageViewer::MessageViewerCheckBeforeDeletingInterfacePrivate
15 {
16 public:
MessageViewerCheckBeforeDeletingInterfacePrivate()17     MessageViewerCheckBeforeDeletingInterfacePrivate()
18     {
19     }
20 
21     MessageViewer::MessageViewerCheckBeforeDeletingParameters parameters;
22     QWidget *mParentWidget = nullptr;
23 };
24 
MessageViewerCheckBeforeDeletingInterface(QObject * parent)25 MessageViewerCheckBeforeDeletingInterface::MessageViewerCheckBeforeDeletingInterface(QObject *parent)
26     : QObject(parent)
27     , d(new MessageViewer::MessageViewerCheckBeforeDeletingInterfacePrivate)
28 {
29 }
30 
31 MessageViewerCheckBeforeDeletingInterface::~MessageViewerCheckBeforeDeletingInterface() = default;
32 
setParentWidget(QWidget * parent)33 void MessageViewerCheckBeforeDeletingInterface::setParentWidget(QWidget *parent)
34 {
35     d->mParentWidget = parent;
36 }
37 
parentWidget() const38 QWidget *MessageViewerCheckBeforeDeletingInterface::parentWidget() const
39 {
40     return d->mParentWidget;
41 }
42 
reloadConfig()43 void MessageViewerCheckBeforeDeletingInterface::reloadConfig()
44 {
45     // Reimplement it
46 }
47 
setParameters(const MessageViewer::MessageViewerCheckBeforeDeletingParameters & params)48 void MessageViewerCheckBeforeDeletingInterface::setParameters(const MessageViewer::MessageViewerCheckBeforeDeletingParameters &params)
49 {
50     d->parameters = params;
51 }
52 
parameters() const53 MessageViewer::MessageViewerCheckBeforeDeletingParameters MessageViewerCheckBeforeDeletingInterface::parameters() const
54 {
55     return d->parameters;
56 }
57 
actions() const58 QList<QAction *> MessageViewerCheckBeforeDeletingInterface::actions() const
59 {
60     // Reimplement in subclass
61     return {};
62 }
63 
createActions(KActionCollection * ac)64 void MessageViewerCheckBeforeDeletingInterface::createActions(KActionCollection *ac)
65 {
66     Q_UNUSED(ac);
67 }
68