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

This class loads data for a single contact from a datasource. More...

#include <contactmonitor.h>

Signals

void contactChanged ()
 Emitted whenever the contact changes.
 

Public Member Functions

 ContactMonitor (const QString &contactUri)
 
AbstractContact::Ptr contact () const
 The currently loaded information on this contact.
 
QString contactUri () const
 The ID of the contact being loaded.
 

Protected Member Functions

void setContact (const AbstractContact::Ptr &contact)
 Sets or updates the contact and emits contactChanged Subclasses should call this when data is loaded or changes.
 

Detailed Description

This class loads data for a single contact from a datasource.

Datasources should subclass this and call setContact() when the contact loads or changes. It is used for optimising performance over loading all contacts and filtering the results. Subclasses are expected to be asynchronous in loading data.

Since
5.8

Member Function Documentation

◆ contact()

AbstractContact::Ptr KPeople::ContactMonitor::contact ( ) const

The currently loaded information on this contact.

◆ contactChanged

void KPeople::ContactMonitor::contactChanged ( )
signal

Emitted whenever the contact changes.

◆ contactUri()

QString KPeople::ContactMonitor::contactUri ( ) const

The ID of the contact being loaded.

◆ setContact()

void KPeople::ContactMonitor::setContact ( const AbstractContact::Ptr &  contact)
protected

Sets or updates the contact and emits contactChanged Subclasses should call this when data is loaded or changes.