PimCommon::PluginInterface Class

class PimCommon::PluginInterface

The PluginInterface class manages Akonadi-aware generic plugins Author: Laurent Montel <montel@kde.org>. More...

Header: #include <PimCommonAkonadi/PluginInterface>
CMake: find_package(KPim6PimCommonAkonadi REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::PimCommonAkonadi)
Inherits: QObject

Public Functions

PluginInterface(QObject *parent = nullptr)
virtual ~PluginInterface() override
QHash<PimCommon::ActionType::Type, QList<QAction *>> actionsType()
void clearPluginActions(const QString &prefix, KXMLGUIClient *guiClient)
QString configGroupName() const
QString configPrefixSettingKey() const
void createPluginInterface()
virtual bool initializeInterfaceRequires(PimCommon::AbstractGenericPluginInterface *interface)
void initializePluginActions(const QString &prefix, KXMLGUIClient *guiClient)
void initializePlugins()
PimCommon::GenericPlugin *pluginFromIdentifier(const QString &id)
QList<TextAddonsWidgets::PluginUtilData> pluginsDataList() const
void setActionCollection(KActionCollection *ac)
void setParentWidget(QWidget *widget)
void setPluginDirectory(const QString &name)
void setPluginName(const QString &name)
void updateActions(int numberOfSelectedItems, int numberOfSelectedCollections)

Static Public Members

QString actionXmlExtension(PimCommon::ActionType::Type type)

Detailed Description

Member Function Documentation

[explicit] PluginInterface::PluginInterface(QObject *parent = nullptr)

Constructs a PluginInterface. @param parent The parent QObject

[override virtual noexcept] PluginInterface::~PluginInterface()

Destructs the PluginInterface.

[static] QString PluginInterface::actionXmlExtension(PimCommon::ActionType::Type type)

Returns the XML extension for a given action type. @param type The action type @return The XML file extension

QHash<PimCommon::ActionType::Type, QList<QAction *>> PluginInterface::actionsType()

Returns the actions organized by type. @return A hash of action types to action lists

void PluginInterface::clearPluginActions(const QString &prefix, KXMLGUIClient *guiClient)

Clears plugin actions. @param prefix The prefix for action names @param guiClient The KXMLGUIClient to remove actions from

QString PluginInterface::configGroupName() const

Returns the configuration group name. @return The group name

QString PluginInterface::configPrefixSettingKey() const

Returns the configuration prefix key. @return The prefix key

void PluginInterface::createPluginInterface()

Creates the plugin interface.

[virtual] bool PluginInterface::initializeInterfaceRequires(PimCommon::AbstractGenericPluginInterface *interface)

Initializes the interface requirements for a plugin. @param interface The interface to initialize @return true if initialization succeeded, false otherwise

void PluginInterface::initializePluginActions(const QString &prefix, KXMLGUIClient *guiClient)

Initializes plugin actions. @param prefix The prefix for action names @param guiClient The KXMLGUIClient to add actions to

void PluginInterface::initializePlugins()

Initializes the plugins.

PimCommon::GenericPlugin *PluginInterface::pluginFromIdentifier(const QString &id)

Returns a plugin by its identifier. @param id The plugin identifier @return The GenericPlugin with the given id

QList<TextAddonsWidgets::PluginUtilData> PluginInterface::pluginsDataList() const

Returns the list of plugin data. @return A list of PluginUtilData

void PluginInterface::setActionCollection(KActionCollection *ac)

Sets the action collection. @param ac The KActionCollection

void PluginInterface::setParentWidget(QWidget *widget)

Sets the parent widget. @param widget The widget to set as parent

void PluginInterface::setPluginDirectory(const QString &name)

Sets the directory containing plugins. @param name The directory path

void PluginInterface::setPluginName(const QString &name)

Sets the plugin name filter. @param name The plugin name

void PluginInterface::updateActions(int numberOfSelectedItems, int numberOfSelectedCollections)

Updates actions based on selection state. @param numberOfSelectedItems The number of selected items @param numberOfSelectedCollections The number of selected collections