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

modules/LabelMgr.hpp

00001 /*
00002  * Stellarium
00003  * This file Copyright (C) 2008 Matthew Gates
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 _SKYLABELMGR_HPP_
00021 #define _SKYLABELMGR_HPP_
00022 
00023 
00024 #include "StelFader.hpp"
00025 #include "StelModule.hpp"
00026 #include "StelObject.hpp"
00027 #include "StelObjectType.hpp"
00028 #include "VecMath.hpp"
00029 
00030 #include <QVector>
00031 #include <QString>
00032 
00033 class StelCore;
00034 class StelFont;
00035 class StelPainter;
00036 
00045 class LabelMgr : public StelModule
00046 {
00047     Q_OBJECT
00048 
00049 public:
00051     LabelMgr(); 
00052     virtual ~LabelMgr();
00053  
00055     // Methods defined in the StelModule class
00057     virtual void init();
00058     
00060     virtual void draw(StelCore* core);
00061     
00063     virtual void update(double deltaTime);
00064 
00066     virtual double getCallOrder(StelModuleActionName actionName) const;
00067 
00068 public slots:
00083     int labelObject(const QString& text, 
00084                     const QString& objectName,
00085                     bool visible=true,
00086                     float fontSize=14,
00087                     const QString& fontColor="#999999",
00088                     const QString& side="E",
00089                     double labelDistance=-1.0,
00090                     const QString& style="TextOnly");
00091 
00099     int labelScreen(const QString& text,
00100                     int x,
00101                     int y,
00102                     bool visible=true,
00103                     float fontSize=14,
00104                     const QString& fontColor="#999999");
00105 
00107     bool getLabelShow(int id); 
00109     void setLabelShow(int id, bool show); 
00112     bool deleteLabel(int id);
00115     int deleteAllLabels(void);
00116 
00117 private:
00118     QVector<class StelLabel*> allLabels;
00119 };
00120 
00121 #endif // _SKYLABELMGR_HPP_

Generated on Mon Mar 9 16:16:16 2009 for Stellarium by  doxygen 1.5.5