Messagelib

viewerplugininterface.cpp
1 /*
2  SPDX-FileCopyrightText: 2015-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "viewerplugininterface.h"
8 #include "utils/messageviewerutil_p.h"
9 #include <QAction>
10 using namespace MessageViewer;
11 
12 class MessageViewer::ViewerPluginInterfacePrivate
13 {
14 public:
15  ViewerPluginInterfacePrivate() = default;
16 };
17 
18 ViewerPluginInterface::ViewerPluginInterface(QObject *parent)
19  : QObject(parent)
20  , d(new MessageViewer::ViewerPluginInterfacePrivate)
21 {
22 }
23 
24 ViewerPluginInterface::~ViewerPluginInterface() = default;
25 
26 void ViewerPluginInterface::execute()
27 {
28  showWidget();
29 }
30 
31 void ViewerPluginInterface::setText(const QString &text)
32 {
33  Q_UNUSED(text)
34  // Reimplement in subclass.
35 }
36 
37 QList<QAction *> ViewerPluginInterface::actions() const
38 {
39  // Reimplement in subclass
40  return {};
41 }
42 
43 void ViewerPluginInterface::setUrl(const QUrl &url)
44 {
45  Q_UNUSED(url)
46  // Reimplement in subclass
47 }
48 
49 void ViewerPluginInterface::setMessage(const KMime::Message::Ptr &value)
50 {
51  Q_UNUSED(value)
52  // Reimplement in subclass
53 }
54 
55 void ViewerPluginInterface::setMessageItem(const Akonadi::Item &item)
56 {
57  Q_UNUSED(item)
58  // Reimplement in subclass
59 }
60 
61 void ViewerPluginInterface::setCurrentCollection(const Akonadi::Collection &col)
62 {
63  Q_UNUSED(col)
64  // Reimplement in subclass
65 }
66 
67 void ViewerPluginInterface::closePlugin()
68 {
69  // Reimplement in subclass
70 }
71 
72 void ViewerPluginInterface::showWidget()
73 {
74  // Reimplement in subclass
75 }
76 
77 void ViewerPluginInterface::updateAction(const Akonadi::Item &item)
78 {
79  Q_UNUSED(item)
80  // Reimplement in subclass
81 }
82 
83 void ViewerPluginInterface::refreshActionList(KActionCollection *ac)
84 {
85  // TODO
86  Q_UNUSED(ac)
87 }
88 
89 void ViewerPluginInterface::addHelpTextAction(QAction *act, const QString &text)
90 {
91  MessageViewer::Util::addHelpTextAction(act, text);
92 }
93 
94 void ViewerPluginInterface::slotActivatePlugin()
95 {
96  Q_EMIT activatePlugin(this);
97 }
Q_EMITQ_EMIT
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Mar 22 2023 04:07:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.