blob: 42d494e40f8c38443e07088af93c273d53261a5c (
plain) (
tree)
|
|
/*
* Copyright (c) 2012-2015 Christian Surlykke, Petr Vanek
*
* 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 MAINWINDOW_H
#define MAINWINDOW_H
#include <QWidget>
#include <QImage>
#include <QRect>
#include <QSize>
#include "loginform.h"
namespace Ui {
class MainWindow;
}
class QTextEdit;
class MainWindow : public QWidget
{
Q_OBJECT
public:
explicit MainWindow(bool primary, int screen, const QRect &rect, bool testMode, QWidget *parent = 0);
~MainWindow();
void setFocus(Qt::FocusReason reason);
QSize createLogo(const QRect &max);
void createLogWindow(const QRect& geom);
bool showLoginForm();
QImage& getBackground() { return m_background; }
LoginForm* loginForm() { return m_LoginForm; }
private:
int getOffset(QString offset, int maxVal, int defaultVal);
void setBackground();
QRect m_ScreenRect;
bool m_Primary;
LoginForm* m_LoginForm;
QImage m_background;
QTextEdit *m_messages;
};
#endif // MAINWINDOW_H
|