blob: dad9089a0eaf369ea5e957c3836dbb77b32e987b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/*
* 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 <QLabel>
#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, QWidget *parent = 0);
~MainWindow();
void setFocus(Qt::FocusReason reason);
QSize createLogo(QRect max);
QSize createNextLogo(const QRect &max, const QString &path);
QSize createDistro(const QRect &max);
void createLogWindow(const QRect& geom);
void createClock();
bool showLoginForm();
QImage& getBackground() { return m_background; }
LoginForm* loginForm() { return m_LoginForm; }
public slots:
void showStandby();
void updateClock();
private:
int getOffset(QString offset, int maxVal, int defaultVal);
void setBackground();
int drawClock();
QRect m_ScreenRect;
bool m_Primary;
LoginForm* m_LoginForm;
QImage m_background;
QTextEdit *m_messages;
QLabel *m_Clock;
};
#endif // MAINWINDOW_H
|