KPeople

declarativepersondata.h
1 /*
2  SPDX-FileCopyrightText: 2013 David Edmundson <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6 
7 #ifndef DECLARATIVEPERSONDATA_H
8 #define DECLARATIVEPERSONDATA_H
9 
10 #include "persondata.h"
11 
12 class DeclarativePersonData : public QObject
13 {
14  Q_OBJECT
15 
16  Q_PROPERTY(QString personUri READ personUri WRITE setPersonUri NOTIFY personChanged)
17  Q_PROPERTY(KPeople::PersonData *person READ person NOTIFY personChanged)
18  Q_PROPERTY(QString photoImageProviderUri READ photoImageProviderUri NOTIFY photoImageProviderUriChanged)
19 
20 public:
21  explicit DeclarativePersonData(QObject *parent = nullptr);
22 
23  void setPersonUri(const QString &id);
24  QString personUri() const;
25 
26  KPeople::PersonData *person() const;
27 
28  QString photoImageProviderUri() const;
29 
30 Q_SIGNALS:
31  void personChanged();
32  void photoImageProviderUriChanged();
33 
34 private:
35  QString m_id;
36  KPeople::PersonData *m_person = nullptr;
37 };
38 
39 #endif // DECLARATIVEPERSONDATA_H
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Allows to query the information about a given person.
Definition: persondata.h:34
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Aug 14 2022 04:09:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.