LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ui::qt::StartupSplash Class Reference

Frameless startup window shown while the application initialises. More...

#include <StartupSplash.hpp>

Inheritance diagram for ui::qt::StartupSplash:
Inheritance graph
Collaboration diagram for ui::qt::StartupSplash:
Collaboration graph

Public Member Functions

 StartupSplash (const QString &version, QWidget *parent=nullptr)
 
void Step (const QString &message)
 Add a normal progress step (green check-mark).
 
void Warn (const QString &message)
 Add a warning row (orange, non-fatal).
 
void Error (const QString &message)
 Add an error row (red) and set the error flag.
 
void Finish (QWidget *mainWindow)
 
bool HasErrors () const
 

Private Member Functions

void AddRow (const QString &icon, const QString &text, const QColor &color)
 
void Flush ()
 processEvents so each step is visible immediately
 

Private Attributes

QListWidget * m_log {nullptr}
 
QLabel * m_statusLabel {nullptr}
 
QPushButton * m_continueBtn {nullptr}
 
bool m_hasErrors {false}
 

Detailed Description

Frameless startup window shown while the application initialises.

Displays each initialisation step as it happens and highlights warnings (orange) and errors (red). If any errors were recorded, Finish() shows a "Continue" button and waits for the user to acknowledge before closing.

Typical usage in main():

StartupSplash splash(appVersion);
splash.show();
splash.Step("Loading configuration…");
SetupConfig(); // may call splash.Warn / splash.Error
splash.Step("Building UI…");
MainWindow window(controller, events, &splash);
window.show();
splash.Finish(&window); // blocks if errors, then closes
Definition MainWindow.hpp:111
Frameless startup window shown while the application initialises.
Definition StartupSplash.hpp:34

Constructor & Destructor Documentation

◆ StartupSplash()

ui::qt::StartupSplash::StartupSplash ( const QString &  version,
QWidget *  parent = nullptr 
)
explicit

Member Function Documentation

◆ AddRow()

void ui::qt::StartupSplash::AddRow ( const QString &  icon,
const QString &  text,
const QColor &  color 
)
private
Here is the caller graph for this function:

◆ Error()

void ui::qt::StartupSplash::Error ( const QString &  message)

Add an error row (red) and set the error flag.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Finish()

void ui::qt::StartupSplash::Finish ( QWidget *  mainWindow)

Close immediately if no errors were recorded; otherwise show a "Continue" button and block in a local event loop until clicked.

Here is the caller graph for this function:

◆ Flush()

void ui::qt::StartupSplash::Flush ( )
private

processEvents so each step is visible immediately

Here is the caller graph for this function:

◆ HasErrors()

bool ui::qt::StartupSplash::HasErrors ( ) const
inline

◆ Step()

void ui::qt::StartupSplash::Step ( const QString &  message)

Add a normal progress step (green check-mark).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Warn()

void ui::qt::StartupSplash::Warn ( const QString &  message)

Add a warning row (orange, non-fatal).

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_continueBtn

QPushButton* ui::qt::StartupSplash::m_continueBtn {nullptr}
private

◆ m_hasErrors

bool ui::qt::StartupSplash::m_hasErrors {false}
private

◆ m_log

QListWidget* ui::qt::StartupSplash::m_log {nullptr}
private

◆ m_statusLabel

QLabel* ui::qt::StartupSplash::m_statusLabel {nullptr}
private

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