Lomiri
UsersModelPrivate.h
1 /*
2  * Copyright (C) 2013-2016 Canonical Ltd.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; version 3.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Author: Michael Terry <michael.terry@canonical.com>
17  */
18 
19 #ifndef LOMIRI_MOCK_USERSMODEL_PRIVATE_H
20 #define LOMIRI_MOCK_USERSMODEL_PRIVATE_H
21 
22 #include <QList>
23 #include <QObject>
24 #include <QString>
25 
26 #include <sys/types.h>
27 
28 class AccountsServiceDBusAdaptor;
29 
30 namespace QLightDM
31 {
32 class UsersModel;
33 
34 class Entry
35 {
36 public:
37  QString username;
38  QString real_name;
39  QString background;
40  QString layouts;
41  bool is_active;
42  bool has_messages;
43  QString session;
44  QString infographic;
45  uid_t uid;
46 };
47 
48 class UsersModelPrivate : public QObject
49 {
50  Q_OBJECT
51 
52 public:
53  explicit UsersModelPrivate(UsersModel *parent = 0);
54  virtual ~UsersModelPrivate() = default;
55 
56  QList<Entry> entries;
57 
58 Q_SIGNALS:
59  void dataChanged(int);
60 
61 protected:
62  UsersModel * const q_ptr;
63 
64 private:
65  Q_DECLARE_PUBLIC(UsersModel)
66 
67  void updateName(bool async);
68 
69  AccountsServiceDBusAdaptor *m_service;
70 };
71 
72 }
73 
74 #endif // LOMIRI_MOCK_USERSMODEL_PRIVATE_H