Pimcommon

plugininterface.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 "pimcommonakonadi_export.h"
10#include <PimCommon/PluginUtil>
11#include <PimCommonAkonadi/GenericPluginInterface>
12#include <QObject>
14class QAction;
15class KXMLGUIClient;
16namespace PimCommon
17{
18class PluginInterfacePrivate;
19/**
20 * @brief The PluginInterface class
21 * @author Laurent Montel <montel@kde.org>
22 */
23class PIMCOMMONAKONADI_EXPORT PluginInterface : public QObject
24{
25 Q_OBJECT
26public:
27 explicit PluginInterface(QObject *parent = nullptr);
28 ~PluginInterface() override;
29
30 void setParentWidget(QWidget *widget);
31 [[nodiscard]] QHash<PimCommon::ActionType::Type, QList<QAction *>> actionsType();
32 void createPluginInterface();
33
34 void setPluginName(const QString &name);
35 void setPluginDirectory(const QString &name);
36 void initializePlugins();
37 virtual bool initializeInterfaceRequires(AbstractGenericPluginInterface *interface);
38 [[nodiscard]] static QString actionXmlExtension(PimCommon::ActionType::Type type);
39
40 void initializePluginActions(const QString &prefix, KXMLGUIClient *guiClient);
41 void updateActions(int numberOfSelectedItems, int numberOfSelectedCollections);
42
43 void setActionCollection(KActionCollection *ac);
44
45 [[nodiscard]] QList<PimCommon::PluginUtilData> pluginsDataList() const;
46 [[nodiscard]] QString configGroupName() const;
47 [[nodiscard]] QString configPrefixSettingKey() const;
48
49 [[nodiscard]] PimCommon::GenericPlugin *pluginFromIdentifier(const QString &id);
50 void clearPluginActions(const QString &prefix, KXMLGUIClient *guiClient);
51
52private:
53 PIMCOMMONAKONADI_NO_EXPORT void slotPluginActivated(PimCommon::AbstractGenericPluginInterface *interface);
54 std::unique_ptr<PluginInterfacePrivate> const d;
55};
56}
The GenericPlugin class.
The PluginInterface 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.