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 }
Q_EMITQ_EMIT
void contactChanged()
Emitted whenever the contact changes.
void setContact(const AbstractContact::Ptr &contact)
Sets or updates the contact and emits contactChanged Subclasses should call this when data is loaded ...
This class loads data for a single contact from a datasource.
QString contactUri() const
The ID of the contact being loaded.
AbstractContact::Ptr contact() const
The currently loaded information on this contact.
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Jul 1 2022 05:11:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.