Messagelib

viewerplugintoolmanager.h
1 /*
2  SPDX-FileCopyrightText: 2015-2021 Laurent Montel <[email protected]>
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>
13 class KActionCollection;
14 class QAction;
15 namespace MessageViewer
16 {
17 class ViewerPluginToolManagerPrivate;
18 class ViewerPluginInterface;
19 /**
20  * @brief The ViewerPluginToolManager class
21  * @author Laurent Montel <[email protected]>
22  */
23 class MESSAGEVIEWER_EXPORT ViewerPluginToolManager : public QObject
24 {
25  Q_OBJECT
26 public:
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  Q_REQUIRED_RESULT QString pluginName() const;
37  Q_REQUIRED_RESULT bool initializePluginList();
38  Q_REQUIRED_RESULT 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  Q_REQUIRED_RESULT QString pluginDirectory() const;
49 Q_SIGNALS:
50  void activatePlugin(MessageViewer::ViewerPluginInterface *);
51 
52 private:
53  std::unique_ptr<ViewerPluginToolManagerPrivate> const d;
54 };
55 }
The ViewerPluginToolManager class.
The ViewerPluginInterface class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:05:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.