Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

core/StelLoadingBar.hpp

00001 /*
00002  * Stellarium
00003  * Copyright (C) 2005 Fabien Chereau
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018  */
00019 
00020 #ifndef _STELLOADINGBAR_HPP_
00021 #define _STELLOADINGBAR_HPP_
00022 
00023 #include "StelTextureTypes.hpp"
00024 #include "StelProjectorType.hpp"
00025 #include "VecMath.hpp"
00026 
00027 #include <QString>
00028 #include <QFont>
00029 
00040 class StelLoadingBar
00041 {
00042 public:
00052     StelLoadingBar(float fontSize, const QString&  splashTex, const QString& extraTextString="", 
00053                float extraTextSize = 30.f, float extraTextPosx = 0.f, float extraTextPosy = 0.f);
00054 
00055     virtual ~StelLoadingBar();
00056     
00059     void SetMessage(QString m) {message=m;}
00060     
00064     void Draw(float val);
00065 
00066 private:
00067     QString message;
00068     int splashx, splashy, barx, bary, width, height, barwidth, barheight;
00069     QFont barfont;
00070     QFont extraTextFont;
00071     StelTextureSP splash;
00072     QString extraText;
00073     Vec2f extraTextPos;
00074     double timeCounter;
00075 
00076     class StelPainter* sPainter;
00077 };
00078 
00079 #endif // _STELLOADINGBAR_HPP_

Generated on Mon Mar 22 09:55:37 2010 for Stellarium by  doxygen 1.5.5