KPeople

contactmonitor.cpp
1 /*
2  Abstract class to load a monitor changes for a single contact
3  SPDX-FileCopyrightText: 2013 David Edmundson <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7 
8 #include "contactmonitor.h"
9 
10 using namespace KPeople;
11 
12 class KPeople::ContactMonitorPrivate
13 {
14 public:
15  QString m_contactUri;
16  AbstractContact::Ptr m_contact;
17 };
18 
19 ContactMonitor::ContactMonitor(const QString &contactUri)
20  : QObject(nullptr)
21  , d_ptr(new ContactMonitorPrivate)
22 {
24  d->m_contactUri = contactUri;
25 }
26 
27 ContactMonitor::~ContactMonitor()
28 {
29  delete d_ptr;
30 }
31 
33 {
35 
36  d->m_contact = contact;
38 }
39 
41 {
42  Q_D(const ContactMonitor);
43 
44  return d->m_contact;
45 }
46 
48 {
49  Q_D(const ContactMonitor);
50 
51  return d->m_contactUri;
52 }
void contactChanged(const QString &contactUri, const KPeople::AbstractContact::Ptr &contact)
DataSources should emit this whenever a known contact changes.
QString contactUri() const
The ID of the contact being loaded.
This class loads data for a single contact from a datasource.
AbstractContact::Ptr contact() const
The currently loaded information on this contact.
void setContact(const AbstractContact::Ptr &contact)
Sets or updates the contact and emits contactChanged Subclasses should call this when data is loaded ...
Q_D(Todo)
Q_EMITQ_EMIT
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jan 27 2022 22:42:01 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.