11#include <QtGui/qscreen.h>
12#include <QtGui/qwindow.h>
13#include <QtCore/qdebug.h>
14#include <QtCore/qelapsedtimer.h>
15#include <private/qwidget_p.h>
18# include <QtCore/qt_windows.h>
191 return d->currStatus;
201 d_func()->currStatus.clear();
208 enum { TimeOutMs = 10 };
209 auto isMapped = [
widget](){
215 while (!isMapped()) {
222 Sleep(
uint(TimeOutMs));
224 struct timespec ts = { TimeOutMs / 1000, (TimeOutMs % 1000) * 1000 * 1000 };
225 nanosleep(&ts,
nullptr);
239 if (!mainWin->windowHandle())
240 mainWin->createWinId();
270 return d_func()->pixmap;
293#ifdef QT_NO_TEXTHTMLPARSER
307 r.setTop(
r.height() - txtSize.height());
309 r.setTop(
r.height() / 2 - txtSize.height() / 2);
337 d->handlePaintEvent();
351#include "moc_qsplashscreen.cpp"
The QColor class provides colors based on RGB, HSV or CMYK values.
static void processEvents(QEventLoop::ProcessEventsFlags flags=QEventLoop::AllEvents)
Processes some pending events for the calling thread according to the specified flags.
static void sendPostedEvents(QObject *receiver=nullptr, int event_type=0)
Immediately dispatches all events which have been previously queued with QCoreApplication::postEvent(...
Type type() const
Returns the event type.
The QPainter class performs low-level painting on widgets and other paint devices.
void setPen(const QColor &color)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setLayoutDirection(Qt::LayoutDirection direction)
Sets the layout direction used by the painter when drawing text, to the specified direction.
void restore()
Restores the current painter state (pops a saved state off the stack).
void save()
Saves the current painter state (pushes the state onto a stack).
void drawText(const QPointF &p, const QString &s)
Draws the given text with the currently defined text direction, beginning at the given position.
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device.
void translate(const QPointF &offset)
Translates the coordinate system by the given offset; i.e.
void setRenderHints(RenderHints hints, bool on=true)
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
QSizeF deviceIndependentSize() const
Returns the size of the pixmap in device independent pixels.
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QRect adjusted(int x1, int y1, int x2, int y2) const noexcept
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
The QScreen class is used to query screen properties. \inmodule QtGui.
constexpr QSize toSize() const noexcept
Returns an integer based copy of this size.
The QSplashScreen widget provides a splash screen that can be shown during application startup.
QSplashScreen(const QPixmap &pixmap=QPixmap(), Qt::WindowFlags f=Qt::WindowFlags())
Construct a splash screen that will display the pixmap.
void messageChanged(const QString &message)
This signal is emitted when the message on the splash screen changes.
void setPixmap(const QPixmap &pixmap)
Sets the pixmap that will be used as the splash screen's image to pixmap.
void repaint()
This overrides QWidget::repaint().
const QPixmap pixmap() const
Returns the pixmap that is used in the splash screen.
bool event(QEvent *e) override
\reimp
void clearMessage()
Removes the message being displayed on the splash screen.
void finish(QWidget *w)
Makes the splash screen wait until the widget mainWin is displayed before calling close() on itself.
void showMessage(const QString &message, int alignment=Qt::AlignLeft, const QColor &color=Qt::black)
Draws the message text onto the splash screen with color color and aligns the text according to the f...
void mousePressEvent(QMouseEvent *) override
\reimp
virtual ~QSplashScreen()
Destructor.
virtual void drawContents(QPainter *painter)
Draw the contents of the splash screen using painter painter.
\macro QT_RESTRICTED_CAST_FROM_ASCII
void setAlignment(Qt::Alignment alignment)
Sets the paragraph's alignment.
\reentrant \inmodule QtGui
\reentrant \inmodule QtGui
void setHtml(const QString &html)
Replaces the entire contents of the document with the given HTML-formatted text in the html string.
QSizeF size
the actual size of the document. This is equivalent to documentLayout()->documentSize();
void setPlainText(const QString &text)
Replaces the entire contents of the document with the given plain text.
void setTextWidth(qreal width)
void drawContents(QPainter *painter, const QRectF &rect=QRectF())
void start(int msec)
Starts or restarts the timer with a timeout interval of msec milliseconds.
Combined button and popup list for selecting options.
@ WA_TranslucentBackground
Q_GUI_EXPORT bool mightBeRichText(QAnyStringView)
Returns true if the string text is likely to be rich text; otherwise returns false.
GLbitfield GLuint64 timeout
[4]
GLuint GLsizei const GLchar * message
GLdouble GLdouble GLdouble GLdouble q
static bool waitForWidgetMapped(QWidget *widget, int timeout=1000)
QVideoFrameFormat::PixelFormat fmt