KPeople 5.109.0
Signals | Public Member Functions | Protected Slots | List of all members
KPeople::AllContactsMonitor

This class should be subclassed by each datasource and return a list of all contacts that the datasource knows about. More...

#include <allcontactsmonitor.h>

Signals

void contactAdded (const QString &contactUri, const KPeople::AbstractContact::Ptr &contact)
 DataSources should emit this whenever a contact is added.
 
void contactChanged (const QString &contactUri, const KPeople::AbstractContact::Ptr &contact)
 DataSources should emit this whenever a known contact changes.
 
void contactRemoved (const QString &contactUri)
 DataSources should emit this whenever a contact is removed and they are no longer able to supply up-to-date data on a contact.
 
void initialFetchComplete (bool success)
 Notifies that the DataSource has completed it's initial fetch.
 

Public Member Functions

virtual QMap< QString, AbstractContact::Ptr > contacts ()
 Returns all currently loaded contacts.
 
bool initialFetchSuccess () const
 
bool isInitialFetchComplete () const
 

Protected Slots

void emitInitialFetchComplete (bool success)
 DataSources should call this once they have finished initial retrieval of all contacts from their storage.
 

Detailed Description

This class should be subclassed by each datasource and return a list of all contacts that the datasource knows about.

Subclasses are expected to be asynchronous

Since
5.8

Member Function Documentation

◆ contactAdded

void KPeople::AllContactsMonitor::contactAdded ( const QString &  contactUri,
const KPeople::AbstractContact::Ptr &  contact 
)
signal

DataSources should emit this whenever a contact is added.

◆ contactChanged

void KPeople::AllContactsMonitor::contactChanged ( const QString &  contactUri,
const KPeople::AbstractContact::Ptr &  contact 
)
signal

DataSources should emit this whenever a known contact changes.

◆ contactRemoved

void KPeople::AllContactsMonitor::contactRemoved ( const QString &  contactUri)
signal

DataSources should emit this whenever a contact is removed and they are no longer able to supply up-to-date data on a contact.

◆ contacts()

virtual QMap< QString, AbstractContact::Ptr > KPeople::AllContactsMonitor::contacts ( )
virtual

Returns all currently loaded contacts.

◆ emitInitialFetchComplete

void KPeople::AllContactsMonitor::emitInitialFetchComplete ( bool  success)
protectedslot

DataSources should call this once they have finished initial retrieval of all contacts from their storage.

This will emit initialFetchComplete() signal

success Whether the fetch was successful.

◆ initialFetchComplete

void KPeople::AllContactsMonitor::initialFetchComplete ( bool  success)
signal

Notifies that the DataSource has completed it's initial fetch.

Warning
DataSources should use emitInitialFetchComplete() instead of emitting this signal directly.
Parameters
successTrue when the fetch was successful, False when an error occurred.