KDeclarative

kuserproxy.h
1 /*
2  SPDX-FileCopyrightText: 2013 Marco Martin <[email protected]>
3  SPDX-FileCopyrightText: 2014 Sebastian K├╝gler <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7 
8 #ifndef KUSERPROXY_H
9 #define KUSERPROXY_H
10 
11 #include <QObject>
12 
13 #include <KDirWatch>
14 #include <KUser>
15 
48 class KUserProxy : public QObject
49 {
50  Q_OBJECT
51 
53  Q_PROPERTY(QString loginName READ loginName NOTIFY nameChanged)
55  Q_PROPERTY(QString os READ os CONSTANT)
56  Q_PROPERTY(QString host READ host CONSTANT)
57 
58 public:
59  KUserProxy(QObject *parent = nullptr);
60  ~KUserProxy();
61 
62 
67  QString fullName() const;
68 
74  QString loginName() const;
75 
80  QUrl faceIconUrl() const;
81 
86  QString os();
87 
92  QString host() const;
93 
94 Q_SIGNALS:
100  void nameChanged();
105  void faceIconUrlChanged();
106 
107 private:
108  void update(const QString &path);
109  KDirWatch m_dirWatch;
110  KUser m_user;
111  QString m_os;
112  bool m_temporaryEmptyFaceIconPath;
113 };
114 
115 #endif //KUSERPROXY_H
116 
QString os()
Q_SIGNALSQ_SIGNALS
KUserProxy (exposed as KUser to the QML runtime) is an object allowing read-only access to the user&#39;s...
Definition: kuserproxy.h:48
QString loginName() const
QString host() const
Q_OBJECTQ_OBJECT
QUrl faceIconUrl() const
void nameChanged()
signal that the user&#39;s name or login name changed
QString fullName() const
Q_PROPERTY(...)
void faceIconUrlChanged()
signal that the user image changed
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jan 27 2021 22:38:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.