KPeople::PersonPluginManager Class Reference

#include <personpluginmanager.h>

Static Public Member Functions

static QList< AbstractPersonAction * > actions ()
static bool addContact (const QVariantMap &properties)
static void addDataSource (const QString &sourceId, BasePersonsDataSource *source)
static BasePersonsDataSource * dataSource (const QString &sourceId)
static QList< BasePersonsDataSource * > dataSourcePlugins ()
static bool deleteContact (const QString &uri)
static void setAutoloadDataSourcePlugins (bool autoloadDataSourcePlugins)
static void setDataSourcePlugins (const QHash< QString, BasePersonsDataSource * > &dataSources)

Detailed Description

This class allows applications to manage DataSource plugins.

It can be useful if an application wants to use custom DataSource, without exposing it to other KPeople-based applications (i.e. without installing a system-wide plugin)

Another use-case is that it allows to pass custom arguments to DataSources (i.e. an ItemModel which will be used as a source of data)


Definition at line 47 of file personpluginmanager.h.

Member Function Documentation

bool KPeople::PersonPluginManager::addContact ( const QVariantMap &  properties)

Creates a contact with the specified properties.

if it could be done successfully

Definition at line 124 of file personpluginmanager.cpp.

void PersonPluginManager::addDataSource ( const QString sourceId,
BasePersonsDataSource *  source 

Adds custom data source.

If DataSource with such sourceId was already loaded, we override it

Takes ownership of the source

Definition at line 88 of file personpluginmanager.cpp.

bool KPeople::PersonPluginManager::deleteContact ( const QString uri)

Deletes a contact with the specified &p uri.

if it could be done successfully

Definition at line 137 of file personpluginmanager.cpp.

void PersonPluginManager::setAutoloadDataSourcePlugins ( bool  autoloadDataSourcePlugins)

Use this if you explicitly don't want KPeople to autoload all the available data source plugins via KPluginLoader.

The default behavior is to autoload them

Definition at line 83 of file personpluginmanager.cpp.

void PersonPluginManager::setDataSourcePlugins ( const QHash< QString, BasePersonsDataSource * > &  dataSources)

Instead of loading datasources from plugins, set sources manually This is for unit tests only.

Definition at line 98 of file personpluginmanager.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 8 2020 22:44:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.