Messagelib

viewerplugintoolmanager.h
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "messageviewer_export.h"
10#include "viewerplugininterface.h"
11#include <Akonadi/Item>
12#include <QObject>
14class QAction;
15namespace MessageViewer
16{
17class ViewerPluginToolManagerPrivate;
18class ViewerPluginInterface;
19/**
20 * @brief The ViewerPluginToolManager class
21 * @author Laurent Montel <montel@kde.org>
22 */
23class MESSAGEVIEWER_EXPORT ViewerPluginToolManager : public QObject
24{
25 Q_OBJECT
26public:
27 explicit ViewerPluginToolManager(QWidget *parentWidget, QObject *parent = nullptr);
28 ~ViewerPluginToolManager() override;
29
30 void closeAllTools();
31
32 void createView();
33 void setActionCollection(KActionCollection *ac);
34
35 void setPluginName(const QString &pluginName);
36 [[nodiscard]] QString pluginName() const;
37 [[nodiscard]] bool initializePluginList();
38 [[nodiscard]] QList<QAction *> viewerPluginActionList(ViewerPluginInterface::SpecificFeatureTypes features) const;
39
40 void updateActions(const Akonadi::Item &messageItem);
41
42 /**
43 * @brief refreshActionList Refresh the list of action menu.
44 */
45 void refreshActionList();
46
47 void setPluginDirectory(const QString &directory);
48 [[nodiscard]] QString pluginDirectory() const;
49Q_SIGNALS:
50 void activatePlugin(MessageViewer::ViewerPluginInterface *);
51
52private:
53 std::unique_ptr<ViewerPluginToolManagerPrivate> const d;
54};
55}
The ViewerPluginInterface class.
The ViewerPluginToolManager class.
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.