2 * Copyright (C) 2014 Canonical, Ltd.
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.
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.
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/>.
18#include "GreeterPrivate.h"
19#include <QtCore/QCoreApplication>
25Greeter::Greeter(QObject *parent)
27 d_ptr(new GreeterPrivate(this))
35QString Greeter::authenticationUser() const
38 return d->authenticationUser;
41bool Greeter::hasGuestAccountHint() const
46QString Greeter::getHint(const QString &name) const
52QString Greeter::defaultSessionHint() const
54 return QStringLiteral("ubuntu");
57bool Greeter::hideUsersHint() const
62bool Greeter::showManualLoginHint() const
67bool Greeter::showRemoteLoginHint() const
72bool Greeter::lockHint () const
77QString Greeter::selectUserHint() const
80 return d->selectUserHint;
83void Greeter::setSelectUserHint(const QString &selectUserHint)
86 d->selectUserHint = selectUserHint;
89bool Greeter::selectGuestHint() const
94QString Greeter::autologinUserHint() const
99bool Greeter::autologinGuestHint() const
104int Greeter::autologinTimeoutHint() const
109bool Greeter::inAuthentication() const
114QString Greeter::hostname() const
119bool Greeter::isAuthenticated() const
122 return d->authenticated;
125bool Greeter::connectSync()
130void Greeter::authenticate(const QString &username)
134 d->authenticated = false;
135 d->authenticationUser = username;
136 d->twoFactorDone = false;
137 QTimer::singleShot(0, this, &Greeter::delayedAuthentication);
140void Greeter::delayedAuthentication()
143 d->handleAuthenticate();
146void Greeter::authenticateAsGuest()
149void Greeter::authenticateAutologin()
152void Greeter::authenticateRemote(const QString &session, const QString &username)
158void Greeter::cancelAuthentication()
161void Greeter::setLanguage (const QString &language)
166bool Greeter::startSessionSync(const QString &session)
172void Greeter::respond(const QString &response)
176 d->handleRespond(response);
179void Greeter::sendAuthenticationComplete()
181 if (qgetenv("UNITY_TESTING").isEmpty()) {
182 // simulate PAM's delay
183 QTimer::singleShot(1000, this, &Greeter::authenticationComplete);
185 Q_EMIT authenticationComplete();
189QString Greeter::mockMode() const
196void Greeter::setMockMode(QString mockMode)
200 if (d->mockMode != mockMode) {
201 d->mockMode = mockMode;
202 Q_EMIT mockModeChanged(mockMode);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list