24 #include <qapplication.h> 26 #include <QMouseEvent> 28 #include <QDesktopWidget> 29 #include <QMessageBox> 38 QWidget(0,
Qt::FramelessWindowHint |
Qt::WindowStaysOnTopHint |
Qt::X11BypassWindowManagerHint),
42 QPalette _palette = palette();
43 _palette.setBrush(backgroundRole(), QBrush(
_pix));
50 _msgLabel->setFont(QFont(
"Times", 30));
51 _msgLabel->setGeometry(80, 480, 300, 60);
54 QRect scr = QApplication::desktop()->screenGeometry();
56 move(scr.center() - rect().center());
68 QPixmap textPix =
_pix;
69 QPainter painter(&textPix);
70 painter.setPen(color);
71 QFont tmpFont = painter.font();
73 #if TY_PLATFORM == TY_PLATFORM_LINUX 74 tmpFont.setPointSize(3);
76 tmpFont.setPointSize(10);
78 painter.setFont(tmpFont);
81 r.setRect(r.x() + 10, r.y() + 10, r.width() - 20, r.height() - 20);
83 painter.drawText(r, alignment, message);
85 QPalette _palette = palette();
87 _palette.setBrush(backgroundRole(), QBrush(textPix));
109 QApplication::flush();
Splash screen widget (fichier header)
QPixmap _pix
L'image du splash screen.
void mousePressEvent(QMouseEvent *pEvent)
OSplashScreen(const QPixmap &pixmap, const QString &msgText)
Constructeur par defaut.
void setStatus(const QString &message, int alignment=Qt::AlignLeft, const QColor &color=Qt::black)
Affiche un nouveau message indiquant le status de l'application.
void finish(QWidget *pMainWin)
Indique que le chargement de l'application est termine.
void repaint()
Mise a jour.
virtual ~OSplashScreen()
Destructeur.