Pimcommon

genericpluginmanager.h
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "pimcommon_export.h"
10#include <PimCommon/PluginUtil>
11#include <QList>
12#include <QObject>
13
14namespace PimCommon
15{
16class GenericPluginManagerPrivate;
17class GenericPlugin;
18/**
19 * @brief The GenericPluginManager class
20 * @author Laurent Montel <montel@kde.org>
21 */
22class PIMCOMMON_EXPORT GenericPluginManager : public QObject
23{
24 Q_OBJECT
25public:
26 class GenericPluginData
27 {
28 public:
29 GenericPluginData() = default;
30
31 QString mDescription;
32 QString mName;
33 QString mIdentifier;
34 bool mEnableByDefault = false;
35 };
36
37 explicit GenericPluginManager(QObject *parent = nullptr);
38 ~GenericPluginManager() override;
39
40 [[nodiscard]] bool initializePlugins();
41
42 void setPluginDirectory(const QString &directory);
43 [[nodiscard]] QString pluginDirectory() const;
44
45 void setPluginName(const QString &pluginName);
46 [[nodiscard]] QString pluginName() const;
47
48 [[nodiscard]] QList<PimCommon::GenericPlugin *> pluginsList() const;
49 [[nodiscard]] QList<PimCommon::PluginUtilData> pluginsDataList() const;
50
51 [[nodiscard]] QString configGroupName() const;
52 [[nodiscard]] QString configPrefixSettingKey() const;
53
54 [[nodiscard]] GenericPlugin *pluginFromIdentifier(const QString &id);
55
56private:
57 std::unique_ptr<GenericPluginManagerPrivate> const d;
58};
59}
The GenericPluginManager class.
The GenericPlugin class.
folderdialogacltab.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.