2
This file is part of LightDM-KDE.
4
Copyright 2012 David Edmundson <kde@davidedmundson.co.uk>
6
LightDM-KDE is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
11
LightDM-KDE is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with LightDM-KDE. If not, see <http://www.gnu.org/licenses/>.
20
#include "usersmodel.h"
22
#include <QLightDM/UsersModel>
25
#include <KLocalizedString>
27
UsersModel::UsersModel(QObject *parent) :
28
ExtraRowProxyModel(parent),
31
setSourceModel(new QLightDM::UsersModel(this));
34
void UsersModel::setShowGuest(bool showGuest)
36
if (showGuest == m_showGuest) {
39
m_showGuest = showGuest;
42
QStandardItem *guest = new QStandardItem(i18n("Guest"));
43
guest->setData("*guest", QLightDM::UsersModel::NameRole);
44
extraRowModel()->appendRow(guest);
46
extraRowModel()->removeRow(0);
50
bool UsersModel::showGuest() const