Startup splash screen with configurable message text colour and alignment.
More...
#include <swmmvissplashscreen.h>
|
| void | onShowMessage (const QString &message) |
| | Displays message on the splash screen using showMessage().
|
| |
|
| | SWMMVisSplashScreen (const QPixmap &pixmap=QPixmap(), Qt::WindowFlags f=Qt::WindowFlags()) |
| | Constructs a splash screen from a pixmap.
|
| |
| | SWMMVisSplashScreen (QWidget *parent, const QPixmap &pixmap=QPixmap(), Qt::WindowFlags f=Qt::WindowFlags()) |
| | Constructs a splash screen with an explicit parent widget.
|
| |
| virtual | ~SWMMVisSplashScreen () |
| | Destructor.
|
| |
| void | setColor (const QColor &color) |
| | Sets the colour used to draw the status message text.
|
| |
| void | setAlignment (Qt::Alignment alignment) |
| | Sets the alignment flags used when drawing the status message.
|
| |
| void | drawContents (QPainter *painter) override |
| | Overridden to draw the status message in the configured colour and at the configured alignment.
|
| |
Startup splash screen with configurable message text colour and alignment.
Overrides QSplashScreen::drawContents() to paint the status message using the colour and alignment set via setColor() / setAlignment(). The default colour is white and the default alignment is Qt::AlignBottom | Qt::AlignHCenter, matching the standard QSplashScreen layout.
◆ SWMMVisSplashScreen() [1/2]
| SWMMVisSplashScreen::SWMMVisSplashScreen |
( |
const QPixmap & |
pixmap = QPixmap(), |
|
|
Qt::WindowFlags |
f = Qt::WindowFlags() |
|
) |
| |
Constructs a splash screen from a pixmap.
- Parameters
-
| pixmap | Splash image (shown full-screen on the splash widget). |
| f | Qt window flags. |
◆ SWMMVisSplashScreen() [2/2]
| SWMMVisSplashScreen::SWMMVisSplashScreen |
( |
QWidget * |
parent, |
|
|
const QPixmap & |
pixmap = QPixmap(), |
|
|
Qt::WindowFlags |
f = Qt::WindowFlags() |
|
) |
| |
Constructs a splash screen with an explicit parent widget.
- Parameters
-
| parent | Qt parent widget. |
| pixmap | Splash image. |
| f | Qt window flags. |
◆ ~SWMMVisSplashScreen()
| SWMMVisSplashScreen::~SWMMVisSplashScreen |
( |
| ) |
|
|
virtual |
◆ drawContents()
| void SWMMVisSplashScreen::drawContents |
( |
QPainter * |
painter | ) |
|
|
override |
Overridden to draw the status message in the configured colour and at the configured alignment.
- Parameters
-
| painter | Active painter for the splash widget. |
◆ onShowMessage
| void SWMMVisSplashScreen::onShowMessage |
( |
const QString & |
message | ) |
|
|
slot |
Displays message on the splash screen using showMessage().
Connected to the application's startup progress chain.
- Parameters
-
| message | Human-readable startup status text. |
◆ setAlignment()
| void SWMMVisSplashScreen::setAlignment |
( |
Qt::Alignment |
alignment | ) |
|
Sets the alignment flags used when drawing the status message.
- Parameters
-
| alignment | Qt::Alignment flags, e.g. Qt::AlignBottom | Qt::AlignLeft. |
◆ setColor()
| void SWMMVisSplashScreen::setColor |
( |
const QColor & |
color | ) |
|
Sets the colour used to draw the status message text.
- Parameters
-
| color | Message text colour (default: white). |
The documentation for this class was generated from the following files: