File indexing completed on 2024-05-26 05:35:56
0001 /* 0002 This file is part of LightDM-KDE. 0003 0004 Copyright 2011, 2012 David Edmundson <kde@davidedmundson.co.uk> 0005 0006 LightDM-KDE is free software: you can redistribute it and/or modify 0007 it under the terms of the GNU General Public License as published by 0008 the Free Software Foundation, either version 3 of the License, or 0009 (at your option) any later version. 0010 0011 LightDM-KDE is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0014 GNU General Public License for more details. 0015 0016 You should have received a copy of the GNU General Public License 0017 along with LightDM-KDE. If not, see <http://www.gnu.org/licenses/>. 0018 */ 0019 0020 #ifndef USERSMODEL_H 0021 #define USERSMODEL_H 0022 0023 #include "extrarowproxymodel.h" 0024 0025 class UsersModel : public ExtraRowProxyModel 0026 { 0027 Q_OBJECT 0028 0029 Q_PROPERTY(bool showGuest READ showGuest WRITE setShowGuest) 0030 public: 0031 explicit UsersModel(QObject *parent = 0); 0032 0033 /** Temporary work around for AccountsService always returning ~/.face instead*/ 0034 virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; 0035 0036 /** Add a row to the sessions model titled "Last Used Session" */ 0037 void setShowGuest(bool showGuest); 0038 bool showGuest() const; 0039 0040 signals: 0041 0042 public slots: 0043 0044 private: 0045 bool m_showGuest; 0046 0047 }; 0048 0049 #endif // SESSIONSMODEL_H