-
Notifications
You must be signed in to change notification settings - Fork 10
/
utsplash.h
46 lines (40 loc) · 1014 Bytes
/
utsplash.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
45
46
#ifndef UTSPLASH_H
#define UTSPLASH_H
#include <QLabel>
class UTSplash : public QLabel
{
QString m_message;
void paintEvent(QPaintEvent *event);
// void changeEvent(QEvent* e)
// {
// switch (e->type())
// {
// case QEvent::LanguageChange:
// break;
// case QEvent::WindowStateChange:
// {
// if (this->windowState() & Qt::WindowMinimized)
// {
// QTimer::singleShot(250, this, SLOT(hide()));
// }
//
// break;
// }
// default:
// break;
// }
// QLabel::changeEvent(e);
// }
public:
UTSplash(const QPixmap & pixmap = QPixmap()) {
setPixmap(pixmap);
this->setFixedSize(QSize(pixmap.width(), pixmap.height()));
}
void showMessage(QString str) {
if(str != m_message) {
m_message = str;
repaint();
}
}
};
#endif // UTSPLASH_H