CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
CaptureMoment::UI::SplashScreen Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SplashScreen()

CaptureMoment::UI::SplashScreen::SplashScreen ( const QString & image_path = ":/splash/splash-screen.png",
QScreen * screen = nullptr )
explicit

Constructor for the splash screen.

Parameters
image_pathThe file path or Qt resource path (qrc) to the splash screen logo image. Defaults to the embedded application logo.
screenThe target screen to display the splash screen on.

Definition at line 18 of file splash_screen.cpp.

Member Function Documentation

◆ showMessage()

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.

Parameters
messageThe text message to display.
alignmentThe alignment of the message within the splash screen.
colorThe color of the message text.

Definition at line 54 of file splash_screen.cpp.

Referenced by main().

◆ drawContents()

void CaptureMoment::UI::SplashScreen::drawContents ( QPainter * painter)
overrideprotected

Draws the custom contents (the status message) over the pixmap.

Parameters
painterThe painter used to draw the message.

Definition at line 64 of file splash_screen.cpp.


The documentation for this class was generated from the following files:
CaptureMoment — footer