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
26class AccountsServiceDBusAdaptor;
27
28namespace QLightDM
29{
30class UsersModel;
31
32class Entry
33{
34public:
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 uid_t uid;
44};
45
46class UsersModelPrivate : public QObject
47{
48 Q_OBJECT
49
50public:
51 explicit UsersModelPrivate(UsersModel *parent = 0);
52 virtual ~UsersModelPrivate() = default;
53
54 QList<Entry> entries;
55
56Q_SIGNALS:
57 void dataChanged(int);
58
59protected:
60 UsersModel * const q_ptr;
61
62private:
63 Q_DECLARE_PUBLIC(UsersModel)
64
65 void updateName(bool async);
66
67 AccountsServiceDBusAdaptor *m_service;
68};
69
70}
71
72#endif // LOMIRI_MOCK_USERSMODEL_PRIVATE_H