Messagelib

viewerpluginmanager.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 <PimCommon/PluginUtil>
11 #include <QObject>
12 namespace MessageViewer
13 {
14 class ViewerPluginManagerPrivate;
15 class ViewerPlugin;
16 /**
17  * @brief The ViewerPluginManager class
18  * @author Laurent Montel <montel@kde.org>
19  */
20 class MESSAGEVIEWER_EXPORT ViewerPluginManager : public QObject
21 {
22  Q_OBJECT
23 public:
24  explicit ViewerPluginManager(QObject *parent = nullptr);
25  ~ViewerPluginManager() override;
26  static ViewerPluginManager *self();
27 
28  [[nodiscard]] QList<MessageViewer::ViewerPlugin *> pluginsList() const;
29  [[nodiscard]] QList<PimCommon::PluginUtilData> pluginsDataList() const;
30 
31  [[nodiscard]] bool initializePluginList();
32 
33  [[nodiscard]] QString configGroupName() const;
34  [[nodiscard]] QString configPrefixSettingKey() const;
35  [[nodiscard]] MessageViewer::ViewerPlugin *pluginFromIdentifier(const QString &id);
36  [[nodiscard]] QString pluginDirectory() const;
37  void setPluginDirectory(const QString &directory);
38  void setPluginName(const QString &pluginName);
39  [[nodiscard]] QString pluginName() const;
40 
41 private:
42  Q_DISABLE_COPY(ViewerPluginManager)
43  std::unique_ptr<ViewerPluginManagerPrivate> const d;
44 };
45 }
The ViewerPluginManager class.
The ViewerPlugin class.
Definition: viewerplugin.h:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 03:55:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.