|
CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
|
Custom splash screen displaying the application logo and loading status. More...
#include <splash_screen.h>
Inheritance diagram for CaptureMoment::UI::SplashScreen:
Collaboration diagram for CaptureMoment::UI::SplashScreen:Public Member Functions | |
| SplashScreen (const QString &image_path=":/splash/splash-screen.png", QScreen *screen=nullptr) | |
| Constructor for the splash screen. | |
| void | showMessage (const QString &message, int alignment=Qt::AlignBottom|Qt::AlignHCenter, const QColor &color=Qt::darkGray) |
| Updates the loading status message displayed on the splash screen. | |
Protected Member Functions | |
| void | drawContents (QPainter *painter) override |
| Draws the custom contents (the status message) over the pixmap. | |
Custom splash screen displaying the application logo and loading status.
This class handles high-DPI scaling of the provided logo and renders a subtle loading message at the bottom of the window.
Definition at line 21 of file splash_screen.h.
|
explicit |
Constructor for the splash screen.
| image_path | The file path or Qt resource path (qrc) to the splash screen logo image. Defaults to the embedded application logo. |
| screen | The target screen to display the splash screen on. |
Definition at line 18 of file splash_screen.cpp.
| void CaptureMoment::UI::SplashScreen::showMessage | ( | const QString & | message, |
| int | alignment = Qt::AlignBottom | Qt::AlignHCenter, | ||
| const QColor & | color = Qt::darkGray ) |
Updates the loading status message displayed on the splash screen.
| message | The text message to display. |
| alignment | The alignment of the message within the splash screen. |
| color | The color of the message text. |
Definition at line 54 of file splash_screen.cpp.
Referenced by main().
|
overrideprotected |
Draws the custom contents (the status message) over the pixmap.
| painter | The painter used to draw the message. |
Definition at line 64 of file splash_screen.cpp.