|
gsplash
|
The GSplash module provides a lightweight splash-screen mechanism for GUI-capable runs. When GUI mode is enabled, a splash image is displayed and informational messages can be overlaid as the application starts.
The main entry points are:
A GSplash object is created via create() and returned as a std::unique_ptr, which clearly expresses exclusive ownership. When GUI mode is disabled (option --gui off), create() returns nullptr and the caller can proceed without any GUI dependencies.
Internally, the splash widget is managed as a std::unique_ptr to QSplashScreen. If image loading fails, the splash screen is not created and the object remains in an inactive state where message calls become no-ops.
Qt resource lookup: first a direct load is attempted, then the same name is tried as ":/<name>".NOSPLASHIMAGESELECTED is used, the image path is read from the environment variable GSPLASH.QCoreApplication::processEvents to keep the splash responsive while the application is still initializing.This module reads the following option keys from the runtime option provider:
guifalse, GSplash::create() returns nullptr and all message calls are no-opstrue, GSplash::create() attempts to create and show the splash screenGSplash uses the standard logging infrastructure (classes derived from glogger through the base facilities). The effective verbosity is controlled by the logger configuration associated with GSPLASH_LOGGER.
The module includes example code that demonstrates GUI and CLI execution paths.
Example snippet: