-
Notifications
You must be signed in to change notification settings - Fork 103
/
load_screen.h
44 lines (33 loc) · 850 Bytes
/
load_screen.h
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
/*
SPDX-FileCopyrightText: 2010-2016 Graeme Gott <graeme@gottcode.org>
SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef FOCUSWRITER_LOAD_SCREEN_H
#define FOCUSWRITER_LOAD_SCREEN_H
#include <QLabel>
#include <QPixmap>
class QGraphicsOpacityEffect;
class QTimer;
class LoadScreen : public QLabel
{
Q_OBJECT
public:
explicit LoadScreen(QWidget* parent);
bool eventFilter(QObject* watched, QEvent* event) override;
public Q_SLOTS:
void setText(const QString& step);
void finish();
protected:
void hideEvent(QHideEvent* event) override;
void showEvent(QShowEvent* event) override;
void paintEvent(QPaintEvent* event) override;
private Q_SLOTS:
void fade();
private:
QPixmap m_pixmap;
QSizeF m_pixmap_center;
QLabel* m_text;
QGraphicsOpacityEffect* m_hide_effect;
QTimer* m_hide_timer;
};
#endif // FOCUSWRITER_LOAD_SCREEN_H