blob: 8346a58eaa38fd9831fb02844077d5d622b4ae16 (
plain) (
tree)
|
|
/*
* Copyright (c) 2012-2015 Christian Surlykke
*
* This file is part of qt-lightdm-greeter
* It is distributed under the LGPL 2.1 or later license.
* Please refer to the LICENSE file for a copy of the license.
*/
#ifndef LOGINFORM_H
#define LOGINFORM_H
#include <QWidget>
#include <QProcess>
#include <QDialog>
#include <QKeyEvent>
#include <QGraphicsOpacityEffect>
#include <QMap>
#include <QLightDM/Power>
#include <QLightDM/Greeter>
#include <QLightDM/SessionsModel>
namespace Ui
{
class LoginForm;
}
class LoginForm : public QWidget
{
Q_OBJECT
friend class DecoratedUsersModel;
public:
explicit LoginForm(QWidget *parent = 0);
~LoginForm();
virtual void setFocus(Qt::FocusReason reason);
public slots:
void userChanged();
void leaveDropDownActivated(int index);
void respond();
void onPrompt(QString prompt, QLightDM::Greeter::PromptType promptType);
void authenticationComplete();
protected:
virtual void keyPressEvent(QKeyEvent *event);
private:
void initialize();
void addLeaveEntry(bool canDo, QString iconName, QString text, QString actionName);
QString currentSession();
void setCurrentSession(QString session);
Ui::LoginForm *ui;
QLightDM::Greeter m_Greeter;
QLightDM::PowerInterface power;
QLightDM::SessionsModel sessionsModel;
QMap<int, void (QLightDM::PowerInterface::*)()> powerSlots;
};
#endif // LOGINFORM_H
|