KPeople

contactmonitor.cpp
1/*
2 Abstract class to load a monitor changes for a single contact
3 SPDX-FileCopyrightText: 2013 David Edmundson <davidedmundson@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#include "contactmonitor.h"
9
10using namespace KPeople;
11
12class KPeople::ContactMonitorPrivate
13{
14public:
15 QString m_contactUri;
16 AbstractContact::Ptr m_contact;
17};
18
19ContactMonitor::ContactMonitor(const QString &contactUri)
20 : QObject(nullptr)
21 , d_ptr(new ContactMonitorPrivate)
22{
24 d->m_contactUri = contactUri;
25}
26
27ContactMonitor::~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}
53
54#include "moc_contactmonitor.cpp"
This class loads data for a single contact from a datasource.
void setContact(const AbstractContact::Ptr &contact)
Sets or updates the contact and emits contactChanged Subclasses should call this when data is loaded ...
QString contactUri() const
The ID of the contact being loaded.
AbstractContact::Ptr contact() const
The currently loaded information on this contact.
void contactChanged()
Emitted whenever the contact changes.
Q_EMITQ_EMIT
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.