Messagelib

viewerplugintoolmanager.h
1 /*
2  SPDX-FileCopyrightText: 2015-2020 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef VIEWERPLUGINTOOLMANAGER_H
8 #define VIEWERPLUGINTOOLMANAGER_H
9 
10 #include <Item>
11 #include <QObject>
12 #include "messageviewer_export.h"
13 #include "viewerplugininterface.h"
14 class KActionCollection;
15 class QAction;
16 namespace MessageViewer {
17 class ViewerPluginToolManagerPrivate;
18 class ViewerPluginInterface;
23 class MESSAGEVIEWER_EXPORT ViewerPluginToolManager : public QObject
24 {
25  Q_OBJECT
26 public:
27  explicit ViewerPluginToolManager(QWidget *parentWidget, QObject *parent = nullptr);
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 
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  ViewerPluginToolManagerPrivate *const d;
54 };
55 }
56 #endif // VIEWERPLUGINTOOLMANAGER_H
The ViewerPluginToolManager class.
The ViewerPluginInterface class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 23:14:06 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.