File indexing completed on 2026-09-16 09:23:47
0001
0002
0003
0004
0005 #ifndef QSPLASHSCREEN_H
0006 #define QSPLASHSCREEN_H
0007
0008 #include <QtWidgets/qtwidgetsglobal.h>
0009 #include <QtGui/qpixmap.h>
0010 #include <QtWidgets/qwidget.h>
0011
0012 QT_REQUIRE_CONFIG(splashscreen);
0013
0014 QT_BEGIN_NAMESPACE
0015
0016 class QSplashScreenPrivate;
0017
0018 class Q_WIDGETS_EXPORT QSplashScreen : public QWidget
0019 {
0020 Q_OBJECT
0021 public:
0022 explicit QSplashScreen(const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = Qt::WindowFlags());
0023 QSplashScreen(QScreen *screen, const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = Qt::WindowFlags());
0024 virtual ~QSplashScreen();
0025
0026 void setPixmap(const QPixmap &pixmap);
0027 const QPixmap pixmap() const;
0028 void finish(QWidget *w);
0029 void repaint();
0030 QString message() const;
0031
0032 public Q_SLOTS:
0033 void showMessage(const QString &message, int alignment = Qt::AlignLeft,
0034 const QColor &color = Qt::black);
0035 void clearMessage();
0036
0037 Q_SIGNALS:
0038 void messageChanged(const QString &message);
0039
0040 protected:
0041 bool event(QEvent *e) override;
0042 virtual void drawContents(QPainter *painter);
0043 void mousePressEvent(QMouseEvent *) override;
0044
0045 private:
0046 Q_DISABLE_COPY(QSplashScreen)
0047 Q_DECLARE_PRIVATE(QSplashScreen)
0048 };
0049
0050 QT_END_NAMESPACE
0051
0052 #endif