KPeople

declarativepersondata.h
1/*
2 SPDX-FileCopyrightText: 2013 David Edmundson <D.Edmundson@lboro.ac.uk>
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#include <qqmlregistration.h>
13
14class DeclarativePersonData : public QObject
15{
17 QML_NAMED_ELEMENT(PersonData)
18
19 Q_PROPERTY(QString personUri READ personUri WRITE setPersonUri NOTIFY personChanged)
20 Q_PROPERTY(KPeople::PersonData *person READ person NOTIFY personChanged)
21 Q_PROPERTY(QString photoImageProviderUri READ photoImageProviderUri NOTIFY photoImageProviderUriChanged)
22
23public:
24 explicit DeclarativePersonData(QObject *parent = nullptr);
25
26 void setPersonUri(const QString &id);
27 QString personUri() const;
28
29 KPeople::PersonData *person() const;
30
31 QString photoImageProviderUri() const;
32
34 void personChanged();
35 void photoImageProviderUriChanged();
36
37private:
38 QString m_id;
39 KPeople::PersonData *m_person = nullptr;
40};
41
42#endif // DECLARATIVEPERSONDATA_H
Allows to query the information about a given person.
Definition persondata.h:35
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
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.