KPeople::ContactMonitor Class
This class loads data for a single contact from a datasource. More...
Header: | #include <KPeopleBackend/ContactMonitor> |
CMake: | find_package(KF6 REQUIRED COMPONENTS PeopleBackend) target_link_libraries(mytarget PRIVATE KF6::PeopleBackend) |
Since: | 5.8 |
Public Functions
ContactMonitor(const QString &contactUri) | |
KPeople::AbstractContact::Ptr | contact() const |
QString | contactUri() const |
Signals
void | contactChanged() |
Protected Functions
void | setContact(const KPeople::AbstractContact::Ptr &contact) |
Detailed Description
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.
Member Function Documentation
ContactMonitor::ContactMonitor(const QString &contactUri)
KPeople::AbstractContact::Ptr ContactMonitor::contact() const
The currently loaded information on this contact.
See also setContact().
[signal]
void ContactMonitor::contactChanged()
Emitted whenever the contact changes
QString ContactMonitor::contactUri() const
The ID of the contact being loaded
[protected]
void ContactMonitor::setContact(const KPeople::AbstractContact::Ptr &contact)
Sets or updates the contact and emits contactChanged Subclasses should call this when data is loaded or changes
See also contact().