Messagelib

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

KDE's Doxygen guidelines are available online.