CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
splash_screen.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <QSplashScreen>
11#include <QString>
12
13namespace CaptureMoment::UI {
14
21class SplashScreen : public QSplashScreen {
22public:
29 explicit SplashScreen(const QString& image_path = ":/splash/splash-screen.png", QScreen* screen = nullptr);
30
37 void showMessage(const QString& message, int alignment = Qt::AlignBottom | Qt::AlignHCenter,
38 const QColor& color = Qt::darkGray);
39
40protected:
45 void drawContents(QPainter* painter) override;
46
47private:
53 void setupPixmap(const QString& image_path, QScreen* screen);
54
55 QString m_current_message {};
56 int m_alignment {Qt::AlignBottom | Qt::AlignHCenter};
57 QColor m_color {Qt::darkGray};
58};
59
60} // namespace CaptureMoment::UI
Custom splash screen displaying the application logo and loading status.
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.
void drawContents(QPainter *painter) override
Draws the custom contents (the status message) over the pixmap.
SplashScreen(const QString &image_path=":/splash/splash-screen.png", QScreen *screen=nullptr)
Constructor for the splash screen.
CaptureMoment — footer