KDeclarative

kuserproxy.h
1 /*
2 Copyright 2013 Marco Martin <[email protected]>
3 Copyright 2014 Sebastian Kgler <[email protected]>
4 
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) version 3, or any
9 later version accepted by the membership of KDE e.V. (or its
10 successor approved by the membership of KDE e.V.), which shall
11 act as a proxy defined in Section 6 of version 3 of the license.
12 
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17 
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #ifndef KUSERPROXY_H
23 #define KUSERPROXY_H
24 
25 #include <QObject>
26 
27 #include <KDirWatch>
28 #include <KUser>
29 
62 class KUserProxy : public QObject
63 {
64  Q_OBJECT
65 
67  Q_PROPERTY(QString loginName READ loginName NOTIFY nameChanged)
69  Q_PROPERTY(QString os READ os CONSTANT)
70  Q_PROPERTY(QString host READ host CONSTANT)
71 
72 public:
73  KUserProxy(QObject *parent = nullptr);
74  ~KUserProxy();
75 
76 
81  QString fullName() const;
82 
88  QString loginName() const;
89 
94  QUrl faceIconUrl() const;
95 
100  QString os();
101 
106  QString host() const;
107 
108 Q_SIGNALS:
114  void nameChanged();
119  void faceIconUrlChanged();
120 
121 private:
122  void update(const QString &path);
123  KDirWatch m_dirWatch;
124  KUser m_user;
125  QString m_os;
126  bool m_temporaryEmptyFaceIconPath;
127 };
128 
129 #endif //KUSERPROXY_H
130 
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:62
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-2020 The KDE developers.
Generated on Wed Aug 5 2020 22:37:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.