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

core/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., 51 Franklin Street, Suite 500, Boston, MA  02110-1335, 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 StelPainter;
00035 
00044 class LabelMgr : public StelModule
00045 {
00046     Q_OBJECT
00047 
00048 public:
00050     LabelMgr(); 
00051     virtual ~LabelMgr();
00052  
00054     // Methods defined in the StelModule class
00056     virtual void init();
00057     
00059     virtual void draw(StelCore* core);
00060     
00062     virtual void update(double deltaTime);
00063 
00065     virtual double getCallOrder(StelModuleActionName actionName) const;
00066 
00067 public slots:
00082     int labelObject(const QString& text, 
00083                     const QString& objectName,
00084                     bool visible=true,
00085                     float fontSize=14,
00086                     const QString& fontColor="#999999",
00087                     const QString& side="E",
00088                     double labelDistance=-1.0,
00089                     const QString& style="TextOnly");
00090 
00098     int labelScreen(const QString& text,
00099                     int x,
00100                     int y,
00101                     bool visible=true,
00102                     float fontSize=14,
00103                     const QString& fontColor="#999999");
00104 
00106     bool getLabelShow(int id); 
00108     void setLabelShow(int id, bool show); 
00110     void setLabelText(int id, const QString& newText);
00113     bool deleteLabel(int id);
00116     int deleteAllLabels(void);
00117 
00118 private:
00119     QVector<class StelLabel*> allLabels;
00120 };
00121 
00122 #endif // _SKYLABELMGR_HPP_
Generated on Sat Aug 25 22:13:29 2012 for Stellarium by  doxygen 1.6.3