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
72QString Greeter::selectUserHint() const
75 return d->selectUserHint;
78void Greeter::setSelectUserHint(const QString &selectUserHint)
81 d->selectUserHint = selectUserHint;
84bool Greeter::selectGuestHint() const
89QString Greeter::autologinUserHint() const
94bool Greeter::autologinGuestHint() const
99int Greeter::autologinTimeoutHint() const
104bool Greeter::inAuthentication() const
109QString Greeter::hostname() const
114bool Greeter::isAuthenticated() const
117 return d->authenticated;
120bool Greeter::connectSync()
125void Greeter::authenticate(const QString &username)
129 d->authenticated = false;
130 d->authenticationUser = username;
131 d->twoFactorDone = false;
132 QTimer::singleShot(0, this, &Greeter::delayedAuthentication);
135void Greeter::delayedAuthentication()
138 d->handleAuthenticate();
141void Greeter::authenticateAsGuest()
144void Greeter::authenticateAutologin()
147void Greeter::authenticateRemote(const QString &session, const QString &username)
153void Greeter::cancelAuthentication()
156void Greeter::setLanguage (const QString &language)
161bool Greeter::startSessionSync(const QString &session)
167void Greeter::respond(const QString &response)
171 d->handleRespond(response);
174void Greeter::sendAuthenticationComplete()
176 if (qgetenv("UNITY_TESTING").isEmpty()) {
177 // simulate PAM's delay
178 QTimer::singleShot(1000, this, &Greeter::authenticationComplete);
180 Q_EMIT authenticationComplete();
184QString Greeter::mockMode() const
191void Greeter::setMockMode(QString mockMode)
195 if (d->mockMode != mockMode) {
196 d->mockMode = mockMode;
197 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