![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure |
#include <StelLoadingBar.hpp>
Public Member Functions | |
StelLoadingBar (float fontSize, const QString &splashTex, const QString &extraTextString="", float extraTextSize=30.f, float extraTextPosx=0.f, float extraTextPosy=0.f) | |
void | SetMessage (QString m) |
void | Draw (float val) |
A StelLoadingBar has a progress bar whose value can be set after the creation of the StelLoadingBar, and a text display area, whose contents may also be modified after the creation of the StelLoadingBar. It can also have an image which is set at object creation time, and some static text (called extra text, which is set at object creation time. Stellarium's splash screen, visible when the program is first started, is a StelLoadingBar. The image is the logo for the project, the extra text is used to show the application name and version.
StelLoadingBar::StelLoadingBar | ( | float | fontSize, | |
const QString & | splashTex, | |||
const QString & | extraTextString = "" , |
|||
float | extraTextSize = 30.f , |
|||
float | extraTextPosx = 0.f , |
|||
float | extraTextPosy = 0.f | |||
) |
Create and initialise the StelLoadingBar.
fontSize | the size of the font to use in the StelLoadingBar | |
splashTex | the file name of a texture to display with the StelLoadingBar | |
extraTextString | extra text which does not change during the life life of the StelLoadingBar. This is used for the application name and version when the StelLoadingBar is used as a splash screen. | |
extraTextSize | the size of the font used for the exta text | |
extraTextPosx | the x position of the extra text | |
extraTextPosy | the y position of the extra text |
void StelLoadingBar::SetMessage | ( | QString | m | ) | [inline] |
Set the message for the loading bar.
m | a QString message to display under the loading bar |
void StelLoadingBar::Draw | ( | float | val | ) |
Draw the StelLoadingBar, setting the value.
val | the value which the progress bar should display. This is a float which should take a value between 0.0 and 1.0. |