Unity 8
UsersModelPrivate.h
1 /*
2  * Copyright (C) 2013 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 UNITY_MOCK_USERSMODEL_PRIVATE_H
20 #define UNITY_MOCK_USERSMODEL_PRIVATE_H
21 
22 #include <QList>
23 #include <QObject>
24 #include <QString>
25 
26 class AccountsServiceDBusAdaptor;
27 
28 namespace QLightDM
29 {
30 class UsersModel;
31 
32 class Entry
33 {
34 public:
35  QString username;
36  QString real_name;
37  QString background;
38  QString layouts;
39  bool is_active;
40  bool has_messages;
41  QString session;
42  QString infographic;
43 };
44 
45 class UsersModelPrivate : public QObject
46 {
47  Q_OBJECT
48 
49 public:
50  explicit UsersModelPrivate(UsersModel *parent = 0);
51  virtual ~UsersModelPrivate() = default;
52 
53  QList<Entry> entries;
54 
55 Q_SIGNALS:
56  void dataChanged(int);
57 
58 protected:
59  UsersModel * const q_ptr;
60 
61 private:
62  Q_DECLARE_PUBLIC(UsersModel)
63 
64  void updateName(bool async);
65 
66  AccountsServiceDBusAdaptor *m_service;
67 };
68 
69 }
70 
71 #endif // UNITY_MOCK_USERSMODEL_PRIVATE_H