LoadingBar.hpp   StelLoadingBar.hpp 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#ifndef _LOADINGBAR_HPP_ #ifndef _STELLOADINGBAR_HPP_
#define _LOADINGBAR_HPP_ #define _STELLOADINGBAR_HPP_
#include "STextureTypes.hpp" #include "StelTextureTypes.hpp"
#include "vecmath.h" #include "StelProjectorType.hpp"
#include "VecMath.hpp"
#include <QString> #include <QString>
class SFont; class StelFont;
class Projector;
//! @class LoadingBar //! @class StelLoadingBar
//! This class is used to display loading bar. //! This class is used to display loading bar.
//! A LoadingBar has a progress bar whose value can be set after the creati //! A StelLoadingBar has a progress bar whose value can be set after the cr
on eation
//! of the LoadingBar, and a text display area, whose contents may also be //! of the StelLoadingBar, and a text display area, whose contents may also
//! modified after the creation of the LoadingBar. be
//! modified after the creation of the StelLoadingBar.
//! It can also have an image which is set at object creation time, and som e //! It can also have an image which is set at object creation time, and som e
//! static text (called extra text, which is set at object creation time. //! static text (called extra text, which is set at object creation time.
//! Stellarium's splash screen, visible when the program is first started, is //! Stellarium's splash screen, visible when the program is first started, is
//! a LoadingBar. The image is the logo for the project, the extra text is //! a StelLoadingBar. The image is the logo for the project, the extra tex t is
//! used to show the application name and version. //! used to show the application name and version.
class LoadingBar class StelLoadingBar
{ {
public: public:
//! Create and initialise the LoadingBar. //! Create and initialise the StelLoadingBar.
//! @param prj the projector used to display the LoadingBar //! @param fontSize the size of the font to use in the StelLoadingBa
//! @param fontSize the size of the font to use in the LoadingBar r
//! @param splashTex the file name of a texture to display with the //! @param splashTex the file name of a texture to display with the
LoadingBar StelLoadingBar
//! @param screenw the screen width
//! @param screenh the screen height
//! @param extraTextString extra text which does not change during t he life //! @param extraTextString extra text which does not change during t he life
//! life of the LoadingBar. This is used for the application name an //! life of the StelLoadingBar. This is used for the application nam
d version e and version
//! when the LoadingBar is used as a splash screen. //! when the StelLoadingBar is used as a splash screen.
//! @param extraTextSize the size of the font used for the exta text //! @param extraTextSize the size of the font used for the exta text
//! @param extraTextPosx the x position of the extra text //! @param extraTextPosx the x position of the extra text
//! @param extraTextPosy the y position of the extra text //! @param extraTextPosy the y position of the extra text
LoadingBar(Projector* prj, float fontSize, const QString& splashTex StelLoadingBar(float fontSize, const QString& splashTex, const QStr
, ing& extraTextString="",
int screenw, int screenh, const QString& extraTextString=
"",
float extraTextSize = 30.f, float extraTextPosx = 0.f, fl oat extraTextPosy = 0.f); float extraTextSize = 30.f, float extraTextPosx = 0.f, fl oat extraTextPosy = 0.f);
virtual ~LoadingBar(); virtual ~StelLoadingBar();
//! Set the message for the loading bar. //! Set the message for the loading bar.
//! @param m a QString message to display under the loading bar //! @param m a QString message to display under the loading bar
void SetMessage(QString m) {message=m;} void SetMessage(QString m) {message=m;}
//! Draw the LoadingBar, setting the value. //! Draw the StelLoadingBar, setting the value.
//! @param val the value which the progress bar should display. This is a //! @param val the value which the progress bar should display. This is a
//! float which should take a value between 0.0 and 1.0. //! float which should take a value between 0.0 and 1.0.
void Draw(float val); void Draw(float val);
private: private:
QString message; QString message;
Projector* prj;
int splashx, splashy, barx, bary, width, height, barwidth, barheight ; int splashx, splashy, barx, bary, width, height, barwidth, barheight ;
SFont& barfont; StelFont& barfont;
SFont& extraTextFont; StelFont& extraTextFont;
STextureSP splash; StelTextureSP splash;
QString extraText; QString extraText;
Vec2f extraTextPos; Vec2f extraTextPos;
double timeCounter; double timeCounter;
}; };
#endif // _LOADINGBAR_HPP_ #endif // _STELLOADINGBAR_HPP_
 End of changes. 15 change blocks. 
33 lines changed or deleted 29 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/