te::qt::af::SplashScreenManager Class Reference

A singleton for holding the application splash screen. More...

#include <SplashScreenManager.h>

Inheritance diagram for te::qt::af::SplashScreenManager:
te::common::Singleton< SplashScreenManager >

Public Member Functions

void finish (QWidget *w)
 Finishes the splash screen. More...
 
void hide ()
 Hide the splash screen. More...
 
void set (QSplashScreen *impl, int alignment=Qt::AlignLeft, const QColor &color=Qt::black)
 It sets the splash screen to be used during the application startup. More...
 
void setLogo (const QPixmap &pix)
 Updates the image to be presented on splash screen. More...
 
void show ()
 Shows the splash screen. More...
 
void showMessage (const QString &message)
 This will cause the text to be drawn on the splash screen and a call to Application::processEvents() will be made. More...
 

Static Public Member Functions

static SplashScreenManagergetInstance ()
 It returns a reference to the singleton instance. More...
 

Protected Member Functions

 SplashScreenManager ()
 It initializes the singleton. More...
 
 ~SplashScreenManager ()
 Destructor. More...
 

Private Attributes

int m_msgAlignment
 The alignment used to draw the message text. More...
 
QColor m_msgColor
 The color used to draw the message text. More...
 
QSplashScreen * m_sc
 A reference to the splash screen. More...
 

Friends

class te::common::Singleton< SplashScreenManager >
 

Detailed Description

A singleton for holding the application splash screen.

Definition at line 47 of file SplashScreenManager.h.

Constructor & Destructor Documentation

te::qt::af::SplashScreenManager::SplashScreenManager ( )
protected

It initializes the singleton.

te::qt::af::SplashScreenManager::~SplashScreenManager ( )
protected

Destructor.

Member Function Documentation

void te::qt::af::SplashScreenManager::finish ( QWidget *  w)

Finishes the splash screen.

This function makes the splash screen wait until the widget mainWin is displayed before calling close() on itself.

static SplashScreenManager & te::common::Singleton< SplashScreenManager >::getInstance ( )
staticinherited

It returns a reference to the singleton instance.

Returns
A reference to the singleton instance.
void te::qt::af::SplashScreenManager::hide ( )

Hide the splash screen.

This function can be used when something fails and the splash screen is visible.

void te::qt::af::SplashScreenManager::set ( QSplashScreen *  impl,
int  alignment = Qt::AlignLeft,
const QColor &  color = Qt::black 
)

It sets the splash screen to be used during the application startup.

Parameters
implAny splash screen widget.
alignmentThe alignment of the text.
colorThe text color.
Note
The caller is responsible for keeping the splash screen alive until the application is fully initialized.
The application will use the splash screen implementation only during the application startup.
The manager will not take the ownership of the splash screen.
void te::qt::af::SplashScreenManager::setLogo ( const QPixmap &  pix)

Updates the image to be presented on splash screen.

Parameters
pixNew image to be presented.
void te::qt::af::SplashScreenManager::show ( )

Shows the splash screen.

This function can be used when the splash screen is hidden.

void te::qt::af::SplashScreenManager::showMessage ( const QString &  message)

This will cause the text to be drawn on the splash screen and a call to Application::processEvents() will be made.

Parameters
messageThe message to be drawn.

Friends And Related Function Documentation

Definition at line 49 of file SplashScreenManager.h.

Member Data Documentation

int te::qt::af::SplashScreenManager::m_msgAlignment
private

The alignment used to draw the message text.

Definition at line 114 of file SplashScreenManager.h.

QColor te::qt::af::SplashScreenManager::m_msgColor
private

The color used to draw the message text.

Definition at line 115 of file SplashScreenManager.h.

QSplashScreen* te::qt::af::SplashScreenManager::m_sc
private

A reference to the splash screen.

Definition at line 113 of file SplashScreenManager.h.


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