17#include "DBusGreeterList.h"
20#include <QDBusMessage>
23DBusGreeterList::DBusGreeterList(Greeter *greeter,
const QString &path)
24 : LomiriDBusObject(path, QStringLiteral(
"com.lomiri.LomiriGreeter"), true, greeter),
27 connect(m_greeter, &Greeter::authenticationUserChanged,
this, &DBusGreeterList::authenticationUserChangedHandler);
28 connect(m_greeter, &Greeter::promptlessChanged,
this, &DBusGreeterList::promptlessChangedHandler);
31QString DBusGreeterList::GetActiveEntry()
const
33 return m_greeter->authenticationUser();
36void DBusGreeterList::SetActiveEntry(
const QString &entry)
38 Q_EMIT m_greeter->requestAuthenticationUser(entry);
41bool DBusGreeterList::entryIsLocked()
const
43 return !m_greeter->promptless();
46void DBusGreeterList::authenticationUserChangedHandler()
48 notifyPropertyChanged(QStringLiteral(
"ActiveEntry"), m_greeter->authenticationUser());
49 Q_EMIT EntrySelected(m_greeter->authenticationUser());
52void DBusGreeterList::promptlessChangedHandler()
54 notifyPropertyChanged(QStringLiteral(
"EntryIsLocked"), entryIsLocked());
55 Q_EMIT entryIsLockedChanged();