44 #ifndef QT_NO_SPLASHSCREEN 52 #include <QtCore/qdebug.h> 53 #include <private/qwidget_p.h> 145 d_func()->pixmap =
pixmap;
208 d->currStatus = message;
209 d->currAlign = alignment;
210 d->currColor = color;
222 d_func()->currStatus.clear();
234 #if defined(Q_WS_X11) 266 return d_func()->pixmap;
289 #ifdef QT_NO_TEXTHTMLPARSER 305 painter->
drawText(r,
d->currAlign,
d->currStatus);
336 if (!
d->pixmap.isNull())
338 drawContents(&painter);
345 #endif //QT_NO_SPLASHSCREEN The QPainter class performs low-level painting on widgets and other paint devices.
The QColor class provides colors based on RGB, HSV or CMYK values.
virtual ~QSplashScreen()
Destructor.
QRect adjusted(int x1, int y1, int x2, int y2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
#define QT_END_NAMESPACE
This macro expands to.
bool event(QEvent *e)
Reimplemented Function
void restore()
Restores the current painter state (pops a saved state off the stack).
Q_GUI_EXPORT bool mightBeRichText(const QString &)
Returns true if the string text is likely to be rich text; otherwise returns false.
int width() const
Returns the width of the rectangle.
The QString class provides a Unicode character string.
void mergeBlockFormat(const QTextBlockFormat &modifier)
Modifies the block format of the current block (or all blocks that are contained in the selection) wi...
void save()
Saves the current painter state (pushes the state onto a stack).
const QPixmap pixmap() const
Returns the pixmap that is used in the splash screen.
QTextStream & center(QTextStream &stream)
Calls QTextStream::setFieldAlignment(QTextStream::AlignCenter) on stream and returns stream...
void setPlainText(const QString &text)
Replaces the entire contents of the document with the given plain text.
void drawText(const QPointF &p, const QString &s)
Draws the given text with the currently defined text direction, beginning at the given position...
void finish(QWidget *w)
Makes the splash screen wait until the widget mainWin is displayed before calling close() on itself...
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QTextCursor class offers an API to access and modify QTextDocuments.
QSplashScreen(const QPixmap &pixmap=QPixmap(), Qt::WindowFlags f=0)
Construct a splash screen that will display the pixmap.
void setHtml(const QString &html)
Replaces the entire contents of the document with the given HTML-formatted text in the html string...
void select(SelectionType selection)
Selects text in the document according to the given selection.
The QMouseEvent class contains parameters that describe a mouse event.
Q_CORE_EXPORT QTextStream & center(QTextStream &s)
static QDesktopWidget * desktop()
Returns the desktop widget (also called the root window).
The QSplashScreen widget provides a splash screen that can be shown during application startup...
void drawContents(QPainter *painter, const QRectF &rect=QRectF())
Draws the content of the document with painter p, clipped to rect.
void setAlignment(Qt::Alignment alignment)
Sets the paragraph's alignment.
void setPixmap(const QPixmap &pixmap)
Sets the pixmap that will be used as the splash screen's image to pixmap.
#define Q_DECLARE_PUBLIC(Class)
void setTextWidth(qreal width)
bool hasAlpha() const
Returns true if this pixmap has an alpha channel, or has a mask, otherwise returns false...
QObject * parent() const
Returns a pointer to the parent object.
void clearMessage()
Removes the message being displayed on the splash screen.
The QPoint class defines a point in the plane using integer precision.
The QTextBlockFormat class provides formatting information for blocks of text in a QTextDocument...
void setPen(const QColor &color)
Sets the painter's pen to have style Qt::SolidLine, width 0 and the specified color.
The QRect class defines a rectangle in the plane using integer precision.
virtual void drawContents(QPainter *painter)
Draw the contents of the splash screen using painter painter.
The QPixmap class is an off-screen image representation that can be used as a paint device...
The QTextDocument class holds formatted text that can be viewed and edited using a QTextEdit...
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 mousePressEvent(QMouseEvent *)
Reimplemented Function
void messageChanged(const QString &message)
This signal is emitted when the message on the splash screen changes.
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...
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
static void flush()
Flushes the platform specific event queues.
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.
void repaint()
This overrides QWidget::repaint().
void translate(const QPointF &offset)
Translates the coordinate system by the given offset; i.e.